	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_index                     ## -- Begin function save_index
	.p2align	4, 0x90
_save_index:                            ## @save_index
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_log_cur_pos
	movq	_last_snapshot_log_pos@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_9
LBB0_2:
	movq	_engine_snapshot_replica@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	xorl	%eax, %eax
	callq	_log_cur_pos
	movq	(%r15), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_get_new_snapshot_name
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %rbx
	cmpb	$45, (%rax)
	je	LBB0_10
## %bb.5:
	xorl	%eax, %eax
	callq	_save_binlogpos
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	movq	_work_dir@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_compression_level@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_tar_pack
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movq	%rbx, %rdi
	callq	_rename_temporary_snapshot
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
	callq	_print_snapshot_name
	xorl	%eax, %eax
	callq	_log_cur_pos
	movq	%rax, (%r14)
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_12:
	movl	(%r15), %edx
	movl	(%r12), %ecx
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_13:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_kprintf
	movq	%rbx, %rdi
	callq	_unlink
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_last_snapshot_log_pos,8,3      ## @last_snapshot_log_pos
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"skipping generation of new snapshot (snapshot for this position already exists)\n"

	.comm	_engine_snapshot_replica,8,3    ## @engine_snapshot_replica
L_.str.1:                               ## @.str.1
	.asciz	"cannot write index: cannot compute its name\n"

L_.str.2:                               ## @.str.2
	.asciz	"save_binlogpos returns error code %d.\n"

	.comm	_work_dir,4,2                   ## @work_dir
	.comm	_compression_level,4,2          ## @compression_level
L_.str.3:                               ## @.str.3
	.asciz	"tar_pack (%s, %s, %d) return error code %d.\n"

L_.str.4:                               ## @.str.4
	.asciz	"cannot rename new index file from %s: %m\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_index                     ; -- Begin function save_index
	.p2align	2
_save_index:                            ; @save_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	bl	_log_cur_pos
Lloh0:
	adrp	x20, _last_snapshot_log_pos@GOTPAGE
Lloh1:
	ldr	x20, [x20, _last_snapshot_log_pos@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kprintf
	b	LBB0_9
LBB0_2:
Lloh4:
	adrp	x21, _engine_snapshot_replica@GOTPAGE
Lloh5:
	ldr	x21, [x21, _engine_snapshot_replica@GOTPAGEOFF]
	ldr	x19, [x21]
	cbz	x19, LBB0_10
; %bb.3:
	bl	_log_cur_pos
	mov	x1, x0
	ldr	x8, [x21]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_get_new_snapshot_name
	cbz	x0, LBB0_10
; %bb.4:
	mov	x19, x0
	ldrb	w8, [x0]
	cmp	w8, #45
	b.eq	LBB0_10
; %bb.5:
	bl	_save_binlogpos
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_11
; %bb.6:
Lloh6:
	adrp	x21, _work_dir@GOTPAGE
Lloh7:
	ldr	x21, [x21, _work_dir@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh8:
	adrp	x22, _compression_level@GOTPAGE
Lloh9:
	ldr	x22, [x22, _compression_level@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_tar_pack
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_rename_temporary_snapshot
	cbnz	x0, LBB0_14
; %bb.8:
	mov	x0, x19
	bl	_print_snapshot_name
	bl	_log_cur_pos
	str	x0, [x20]
LBB0_9:
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
LBB0_10:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
	str	x0, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
	ldr	w8, [x21]
	ldr	w9, [x22]
	stp	x9, x0, [sp, #16]
	stp	x19, x8, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_kprintf
	mov	w0, #1
	bl	_exit
LBB0_14:
	str	x19, [sp]
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_kprintf
	mov	x0, x19
	bl	_unlink
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_last_snapshot_log_pos,8,3      ; @last_snapshot_log_pos
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"skipping generation of new snapshot (snapshot for this position already exists)\n"

	.comm	_engine_snapshot_replica,8,3    ; @engine_snapshot_replica
l_.str.1:                               ; @.str.1
	.asciz	"cannot write index: cannot compute its name\n"

l_.str.2:                               ; @.str.2
	.asciz	"save_binlogpos returns error code %d.\n"

	.comm	_work_dir,4,2                   ; @work_dir
	.comm	_compression_level,4,2          ; @compression_level
l_.str.3:                               ; @.str.3
	.asciz	"tar_pack (%s, %s, %d) return error code %d.\n"

l_.str.4:                               ; @.str.4
	.asciz	"cannot rename new index file from %s: %m\n"

.subsections_via_symbols
