	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_replica                 ## -- Begin function update_replica
	.p2align	4, 0x90
_update_replica:                        ## @update_replica
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r15d
	testq	%rdi, %rdi
	je	LBB0_41
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_open_replica
	testq	%rax, %rax
	je	LBB0_41
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_replica_close_ctx_crypto
	movq	32(%r14), %rax
	movq	%rax, 32(%rbx)
	movq	$0, 32(%r14)
	movl	8(%r14), %eax
	testl	%eax, %eax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_12
## %bb.3:
	cmpl	$0, 8(%rbx)
	jle	LBB0_12
## %bb.4:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rax
	movslq	%edx, %r13
	movq	(%rax,%r13,8), %rdi
	movq	24(%rbx), %rax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %r14
	movq	(%rax,%r14,8), %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movl	%edx, %r15d
	callq	_cmp_file_info
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movl	%r15d, %edx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %edx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	leal	1(%r13), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, (%rax,%r13,8)
	movq	24(%rbx), %rax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	incl	%r13d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, (%rax,%r14,8)
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	setle	%dil
	callq	_assert
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movq	(%r15), %rax
	movq	%rax, (%r12)
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r14), %eax
	cmpl	%eax, %edx
	jge	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	8(%rbx), %ecx
	jl	LBB0_6
LBB0_12:
	movl	12(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_23
## %bb.13:
	cmpl	$0, 12(%rbx)
	jle	LBB0_22
## %bb.14:
	xorl	%edx, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movslq	%esi, %r13
	movq	(%rax,%r13,8), %rdi
	movq	16(%rbx), %rax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r14
	movq	(%rax,%r14,8), %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%r12, %rsi
	callq	_cmp_file_info
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	movl	%r15d, %esi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=1
	incl	%r15d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %esi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	leal	1(%r13), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, (%rax,%r13,8)
	movq	16(%rbx), %rax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	incl	%r13d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, (%rax,%r14,8)
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	setle	%dil
	callq	_assert
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movq	(%r15), %rax
	movq	%rax, (%r12)
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	12(%r14), %ecx
	cmpl	%ecx, %esi
	jge	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	12(%rbx), %edx
	jl	LBB0_16
LBB0_22:
	movl	8(%r14), %eax
LBB0_23:
	movl	8(%rbx), %r9d
	movl	%eax, 8(%rbx)
	movl	%r9d, 8(%r14)
	movl	12(%rbx), %eax
	movl	%ecx, 12(%rbx)
	movl	%eax, 12(%r14)
	movups	16(%r14), %xmm0
	movups	16(%rbx), %xmm1
	movups	%xmm0, 16(%rbx)
	movups	%xmm1, 16(%r14)
	movq	_verbosity@GOTPCREL(%rip), %rcx
	cmpl	$2, (%rcx)
	jl	LBB0_25
## %bb.24:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	(%rbx), %rdx
	movl	8(%rbx), %ecx
	movl	12(%rbx), %r8d
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_25:
	movq	%r14, %rdi
	callq	_close_replica
	movl	8(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_31
## %bb.26:
	movq	24(%rbx), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$7, %eax
	cmpq	$7, %rsi
	jae	LBB0_34
## %bb.27:
	xorl	%esi, %esi
	jmp	LBB0_28
LBB0_34:
	andl	$-8, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	8(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	16(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	24(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	32(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	40(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	48(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	56(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	addq	$8, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_35
LBB0_28:
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	movq	%rbx, 8(%rsi)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_30
LBB0_31:
	movl	12(%rbx), %edx
	movl	$1, %r15d
	testl	%edx, %edx
	jle	LBB0_41
## %bb.32:
	movq	16(%rbx), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$7, %eax
	cmpq	$7, %rsi
	jae	LBB0_36
## %bb.33:
	xorl	%esi, %esi
	jmp	LBB0_38
LBB0_36:
	andl	$-8, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	8(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	16(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	24(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	32(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	40(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	48(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	movq	56(%rcx,%rsi,8), %rdi
	movq	%rbx, 8(%rdi)
	addq	$8, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_37
LBB0_38:
	testq	%rax, %rax
	je	LBB0_41
## %bb.39:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	movq	%rbx, 8(%rsi)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_40
LBB0_41:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"finished reloading file list for replica %s: %d binlogs, %d snapshots (OLD: %d, %d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_replica                 ; -- Begin function update_replica
	.p2align	2
_update_replica:                        ; @update_replica
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_32
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_open_replica
	cbz	x0, LBB0_32
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_replica_close_ctx_crypto
	ldr	x8, [x20, #32]
	str	x8, [x19, #32]
	str	xzr, [x20, #32]
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.4:
	mov	w23, #0
	mov	w24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x21, [x8, w24, sxtw #3]
	ldr	x8, [x19, #24]
	ldr	x22, [x8, w23, sxtw #3]
	mov	x0, x21
	mov	x1, x22
	bl	_cmp_file_info
	tbnz	w0, #31, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, #1
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x8, w24
	sxtw	x9, w23
	ldr	x10, [x20, #24]
	add	w24, w24, #1
	str	x22, [x10, x8, lsl #3]
	ldr	x8, [x19, #24]
	add	w23, w23, #1
	str	x21, [x8, x9, lsl #3]
	ldr	x8, [x22]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, le
	bl	_assert
	ldr	x8, [x21]
	str	x8, [x22]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #8]
	cmp	w24, w8
	b.ge	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x19, #8]
	cmp	w23, w9
	b.lt	LBB0_5
LBB0_12:
	ldr	w9, [x20, #12]
	cmp	w9, #1
	b.lt	LBB0_23
; %bb.13:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.14:
	mov	w23, #0
	mov	w24, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x21, [x8, w24, sxtw #3]
	ldr	x8, [x19, #16]
	ldr	x22, [x8, w23, sxtw #3]
	mov	x0, x21
	mov	x1, x22
	bl	_cmp_file_info
	tbnz	w0, #31, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cbz	w0, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w23, w23, #1
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w24, w24, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	sxtw	x8, w24
	sxtw	x9, w23
	ldr	x10, [x20, #16]
	add	w24, w24, #1
	str	x22, [x10, x8, lsl #3]
	ldr	x8, [x19, #16]
	add	w23, w23, #1
	str	x21, [x8, x9, lsl #3]
	ldr	x8, [x22]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, le
	bl	_assert
	ldr	x8, [x21]
	str	x8, [x22]
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x20, #12]
	cmp	w24, w9
	b.ge	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x19, #12]
	cmp	w23, w8
	b.lt	LBB0_15
LBB0_22:
	ldr	w8, [x20, #8]
LBB0_23:
	ldp	w5, w6, [x19, #8]
	stp	w8, w9, [x19, #8]
	ldp	x9, x8, [x19, #16]
	ldp	x11, x10, [x20, #16]
	stp	x11, x10, [x19, #16]
	stp	w5, w6, [x20, #8]
	stp	x9, x8, [x20, #16]
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.le	LBB0_25
; %bb.24:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x2, [x19]
	ldp	w3, w4, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_25:
	mov	x0, x20
	bl	_close_replica
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.26:
	ldr	x9, [x19, #24]
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	str	x19, [x10, #8]
	subs	x8, x8, #1
	b.ne	LBB0_27
LBB0_28:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.29:
	ldr	x9, [x19, #16]
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	str	x19, [x10, #8]
	subs	x8, x8, #1
	b.ne	LBB0_30
LBB0_31:
	mov	w0, #1
	b	LBB0_33
LBB0_32:
	mov	w0, #-1
LBB0_33:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"finished reloading file list for replica %s: %d binlogs, %d snapshots (OLD: %d, %d)\n"

.subsections_via_symbols
