	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_stable
_copy_stable:                           ## @copy_stable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_SEEK_SET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	(%rbx), %edx
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_ftruncate
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	leaq	_copy_stable.buf(%rip), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	testl	%eax, %eax
	jle	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_9
LBB0_5:
	js	LBB0_9
## %bb.6:
	movl	%r14d, %edi
	callq	_fsync
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_syslog                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_copy_stable.buf,1024,4 ## @copy_stable.buf
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stable restart copy failure: %m"

	.no_dead_strip	_copy_stable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_stable
_copy_stable:                           ; @copy_stable
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	bl	_lseek
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_lseek
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_ftruncate
	tbnz	w0, #31, LBB0_9
; %bb.3:
Lloh2:
	adrp	x21, _copy_stable.buf@PAGE
Lloh3:
	add	x21, x21, _copy_stable.buf@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1024
	bl	_read
	mov	x2, x0
	cmp	w0, #0
	b.le	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_write
	tbz	w0, #31, LBB0_4
	b	LBB0_9
LBB0_6:
	tbnz	w2, #31, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_fsync
	tbnz	w0, #31, LBB0_9
; %bb.8:
	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
LBB0_9:
Lloh4:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_syslog
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_copy_stable.buf,1024,0 ; @copy_stable.buf
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stable restart copy failure: %m"

	.no_dead_strip	_copy_stable
.subsections_via_symbols
