	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replay_log                     ## -- Begin function replay_log
	.p2align	4, 0x90
_replay_log:                            ## @replay_log
	.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	_binlog_size@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_18
## %bb.1:
	testl	%edi, %edi
	movl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	cmovnel	%edi, %eax
	movq	_log_time_cutoff@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_log_scan_mode@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_log_cutoff_pos@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movq	_log_rptr@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_log_wptr@GOTPCREL(%rip), %r14
	movq	_log_start@GOTPCREL(%rip), %r15
	movq	_log_end@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_binlog_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	movq	(%r12), %rdx
	subq	%rsi, %rdx
	callq	_read
	movl	%eax, %ebx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_binlogname@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	%rax, (%r13)
	movslq	%ebx, %rdx
	leaq	(%rax,%rdx), %rcx
	movq	%rcx, (%r14)
	movq	_log_pos@GOTPCREL(%rip), %rsi
	addq	%rdx, (%rsi)
	testl	%ebx, %ebx
	je	LBB0_14
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdx
	leaq	-65536(%rdx), %rsi
	cmpq	%rsi, %rax
	jl	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rdi
	subq	%rax, %rdx
	movq	%rax, %rsi
	callq	_memcpy
	movq	(%r15), %rax
	movq	%rax, %rsi
	subq	(%r13), %rsi
	addq	(%r14), %rsi
	movq	%rsi, (%r14)
	movq	%rax, (%r13)
	movq	_binlog_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rdx
	subq	%rsi, %rdx
	callq	_read
	movl	%eax, %ebx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_binlogname@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	(%r14), %rcx
	addq	%rax, %rcx
	movq	%rcx, (%r14)
	movq	_log_pos@GOTPCREL(%rip), %rdx
	addq	%rax, (%rdx)
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %esi
	subl	%eax, %esi
	cmpl	$4, %esi
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	callq	_replay_logevent
	testl	%eax, %eax
	js	LBB0_13
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %eax
	addq	(%r13), %rax
	movq	%rax, (%r13)
	jmp	LBB0_2
LBB0_13:
	movq	(%r14), %rcx
LBB0_14:
	subq	(%r13), %rcx
	jle	LBB0_17
## %bb.15:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:
	movslq	%ecx, %rdx
	movq	_log_pos@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	subq	%rdx, %rcx
	movq	%rcx, (%rax)
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movq	_log_pos@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_log_readto_pos@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_binlog_size,4,2                ## @binlog_size
	.comm	_log_time_cutoff,4,2            ## @log_time_cutoff
	.comm	_log_scan_mode,8,3              ## @log_scan_mode
	.comm	_log_cutoff_pos,4,2             ## @log_cutoff_pos
	.comm	_log_rptr,8,3                   ## @log_rptr
	.comm	_log_wptr,8,3                   ## @log_wptr
	.comm	_binlog_fd,4,2                  ## @binlog_fd
	.comm	_log_start,8,3                  ## @log_start
	.comm	_log_end,8,3                    ## @log_end
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read %d bytes from binlog %s\n"

	.comm	_binlogname,8,3                 ## @binlogname
	.comm	_log_pos,8,3                    ## @log_pos
L_.str.1:                               ## @.str.1
	.asciz	"replay binlog: %d bytes left unread at position %lld\n"

	.comm	_log_readto_pos,8,3             ## @log_readto_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replay_log                     ; -- Begin function replay_log
	.p2align	2
_replay_log:                            ; @replay_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _binlog_size@GOTPAGE
Lloh1:
	ldr	x8, [x8, _binlog_size@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_18
; %bb.1:
	mov	w8, #2147483647
Lloh3:
	adrp	x9, _log_time_cutoff@GOTPAGE
Lloh4:
	ldr	x9, [x9, _log_time_cutoff@GOTPAGEOFF]
	cmp	w0, #0
	csel	w8, w8, w0, eq
Lloh5:
	str	w8, [x9]
Lloh6:
	adrp	x8, _log_scan_mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _log_scan_mode@GOTPAGEOFF]
Lloh8:
	adrp	x9, _log_cutoff_pos@GOTPAGE
Lloh9:
	ldr	x9, [x9, _log_cutoff_pos@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
	mov	w8, #-1
Lloh11:
	str	w8, [x9]
Lloh12:
	adrp	x23, _log_rptr@GOTPAGE
Lloh13:
	ldr	x23, [x23, _log_rptr@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh14:
	adrp	x25, _log_wptr@GOTPAGE
Lloh15:
	ldr	x25, [x25, _log_wptr@GOTPAGEOFF]
Lloh16:
	adrp	x26, _binlog_fd@GOTPAGE
Lloh17:
	ldr	x26, [x26, _binlog_fd@GOTPAGEOFF]
Lloh18:
	adrp	x27, _log_start@GOTPAGE
Lloh19:
	ldr	x27, [x27, _log_start@GOTPAGEOFF]
Lloh20:
	adrp	x28, _log_end@GOTPAGE
Lloh21:
	ldr	x28, [x28, _log_end@GOTPAGEOFF]
Lloh22:
	adrp	x24, _verbosity@GOTPAGE
Lloh23:
	ldr	x24, [x24, _verbosity@GOTPAGEOFF]
Lloh24:
	adrp	x22, _binlogname@GOTPAGE
Lloh25:
	ldr	x22, [x22, _binlogname@GOTPAGEOFF]
Lloh26:
	adrp	x19, l_.str@PAGE
Lloh27:
	add	x19, x19, l_.str@PAGEOFF
Lloh28:
	adrp	x21, _log_pos@GOTPAGE
Lloh29:
	ldr	x21, [x21, _log_pos@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	ldr	x1, [x27]
	ldr	x8, [x28]
	sub	x2, x8, x1
	bl	_read
	mov	x20, x0
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh30:
	adrp	x8, _stderr@GOTPAGE
Lloh31:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	x8, [x22]
	str	x8, [sp]
	mov	x1, x19
	mov	x2, x20
	bl	_fprintf
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	str	x8, [x23]
	sxtw	x10, w20
	add	x9, x8, x10
	str	x9, [x25]
	ldr	x11, [x21]
	add	x10, x11, x10
	str	x10, [x21]
	cbz	w20, LBB0_15
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x10, [x28]
	sub	x11, x10, #16, lsl #12          ; =65536
	cmp	x8, x11
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x27]
	sub	x2, x10, x8
	mov	x1, x8
	bl	_memcpy
	ldr	x8, [x23]
	ldr	x9, [x27]
	ldr	x10, [x25]
	sub	x8, x9, x8
	add	x1, x8, x10
	str	x1, [x25]
	str	x9, [x23]
	ldr	w0, [x26]
	ldr	x8, [x28]
	sub	x2, x8, x1
	bl	_read
	mov	x20, x0
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	ldr	x8, [x22]
	str	x8, [sp]
	mov	x1, x19
	mov	x2, x20
	bl	_fprintf
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x8, w20
	ldr	x9, [x25]
	add	x9, x9, x8
	str	x9, [x25]
	ldr	x10, [x21]
	add	x8, x10, x8
	str	x8, [x21]
	cbz	w20, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w1, w9, w8
	cmp	w1, #4
	b.lt	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x8
	bl	_replay_logevent
	tbnz	w0, #31, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	add	x8, x8, w0, uxtw
	str	x8, [x23]
	b	LBB0_2
LBB0_14:
	ldr	x9, [x25]
LBB0_15:
	ldr	x8, [x23]
	ldr	x10, [x24]
	subs	x2, x9, x8
	ccmp	x10, #0, #4, gt
	b.eq	LBB0_17
; %bb.16:
	ldr	x8, [x21]
	sub	x8, x8, w2, sxtw
	str	x8, [x21]
Lloh36:
	adrp	x9, _stderr@GOTPAGE
Lloh37:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_fprintf
LBB0_17:
	ldr	x8, [x21]
Lloh41:
	adrp	x9, _log_readto_pos@GOTPAGE
Lloh42:
	ldr	x9, [x9, _log_readto_pos@GOTPAGEOFF]
Lloh43:
	str	x8, [x9]
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotStr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_binlog_size,4,2                ; @binlog_size
	.comm	_log_time_cutoff,4,2            ; @log_time_cutoff
	.comm	_log_scan_mode,8,3              ; @log_scan_mode
	.comm	_log_cutoff_pos,4,2             ; @log_cutoff_pos
	.comm	_log_rptr,8,3                   ; @log_rptr
	.comm	_log_wptr,8,3                   ; @log_wptr
	.comm	_binlog_fd,4,2                  ; @binlog_fd
	.comm	_log_start,8,3                  ; @log_start
	.comm	_log_end,8,3                    ; @log_end
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read %d bytes from binlog %s\n"

	.comm	_binlogname,8,3                 ; @binlogname
	.comm	_log_pos,8,3                    ; @log_pos
l_.str.1:                               ; @.str.1
	.asciz	"replay binlog: %d bytes left unread at position %lld\n"

	.comm	_log_readto_pos,8,3             ; @log_readto_pos
.subsections_via_symbols
