	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replay_logevent                ## -- Begin function replay_logevent
	.p2align	4, 0x90
_replay_logevent:                       ## @replay_logevent
	.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
	movl	$-2, %ebx
	cmpl	$4, %esi
	jl	LBB0_25
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_LE_NEWMSG_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	movq	_LE_NEWMSG_MAGIC_MAX@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	subl	%ecx, %esi
	cmpl	%esi, %edx
	jae	LBB0_6
## %bb.2:
	leal	12(,%rdx,8), %r12d
	movl	$-1, %ebx
	cmpl	%r15d, %r12d
	jg	LBB0_25
## %bb.3:
	movq	_log_scan_mode@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movl	%r12d, %ebx
	jmp	LBB0_25
LBB0_6:
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	ja	LBB0_24
## %bb.7:
	movl	$4, %ebx
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_11:
	movl	$-2, %ebx
	cmpl	$12, %r15d
	jb	LBB0_25
## %bb.12:
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_dyn_user_header
	movl	8(%r14), %esi
	movl	%eax, %edi
	callq	_dyn_undelete_msg
	movl	$12, %ebx
	jmp	LBB0_25
LBB0_5:
	leal	(,%rdx,8), %r15d
	movl	4(%r14), %edi
	movl	8(%r14), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dyn_alloc_new_msg
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_assert
	addq	$12, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movl	%r12d, %ebx
	jmp	LBB0_25
LBB0_24:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %ebx
	jmp	LBB0_25
LBB0_15:
	movl	$-2, %ebx
	cmpl	$8, %r15d
	jb	LBB0_25
## %bb.16:
	movq	_log_first_ts@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	4(%r14), %ecx
	jne	LBB0_18
## %bb.17:
	movl	%ecx, (%rax)
LBB0_18:
	movq	_log_read_until@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	cmpl	%ecx, %edx
	jle	LBB0_20
## %bb.19:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	4(%r14), %ecx
LBB0_20:
	movl	%ecx, (%rbx)
	movq	_log_time_cutoff@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$8, %ebx
	cmpl	%eax, %ecx
	jl	LBB0_25
## %bb.21:
	movq	_log_scan_mode@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	jne	LBB0_25
## %bb.22:
	movq	_log_pos@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %r8
	movslq	%r15d, %rsi
	subq	%rsi, %r8
	movq	_log_cutoff_pos@GOTPCREL(%rip), %rsi
	movq	%r8, (%rsi)
	movl	$1, (%rdx)
	movq	_verbosity@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	je	LBB0_25
## %bb.23:
	movq	_stderr@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ecx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_25
LBB0_13:
	movl	$-2, %ebx
	cmpl	$12, %r15d
	jb	LBB0_25
## %bb.14:
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_dyn_user_header
	movl	8(%r14), %esi
	movl	%eax, %edi
	callq	_dyn_delall_msg
	movl	$12, %ebx
	jmp	LBB0_25
LBB0_8:
	movl	$-2, %ebx
	cmpl	$12, %r15d
	jb	LBB0_25
## %bb.9:
	movq	_log_scan_mode@GOTPCREL(%rip), %rax
	movl	$12, %ebx
	cmpl	$0, (%rax)
	jne	LBB0_25
## %bb.10:
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_dyn_user_header
	movl	8(%r14), %esi
	movl	%eax, %edi
	callq	_dyn_delete_msg
LBB0_25:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_15
	.long	L0_0_set_25
	.long	L0_0_set_13
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_LE_NEWMSG_MAGIC,4,2            ## @LE_NEWMSG_MAGIC
	.comm	_LE_NEWMSG_MAGIC_MAX,4,2        ## @LE_NEWMSG_MAGIC_MAX
	.comm	_log_scan_mode,4,2              ## @log_scan_mode
	.comm	_log_first_ts,4,2               ## @log_first_ts
	.comm	_log_read_until,4,2             ## @log_read_until
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"time goes back from %d to %d in log file\n"

	.comm	_log_time_cutoff,4,2            ## @log_time_cutoff
	.comm	_log_pos,4,2                    ## @log_pos
	.comm	_log_cutoff_pos,8,3             ## @log_cutoff_pos
	.comm	_verbosity,4,2                  ## @verbosity
L_.str.1:                               ## @.str.1
	.asciz	"reached timestamp %d above cutoff %d at binlog position %lld, entering scan mode 1\n"

L_.str.2:                               ## @.str.2
	.asciz	"unknown magic in log file: %08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replay_logevent                ; -- Begin function replay_logevent
	.p2align	2
_replay_logevent:                       ; @replay_logevent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cmp	w1, #4
	b.ge	LBB0_2
LBB0_1:
	mov	w20, #-2
	b	LBB0_12
LBB0_2:
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _LE_NEWMSG_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LE_NEWMSG_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w2, w8, w9
Lloh3:
	adrp	x10, _LE_NEWMSG_MAGIC_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _LE_NEWMSG_MAGIC_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	sub	w9, w10, w9
	cmp	w2, w9
	b.hs	LBB0_6
; %bb.3:
	lsl	w22, w2, #3
	add	w20, w22, #12
	cmp	w20, w21
	b.gt	LBB0_11
; %bb.4:
Lloh6:
	adrp	x8, _log_scan_mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _log_scan_mode@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbnz	w8, LBB0_12
; %bb.5:
	ldp	w0, w1, [x19, #4]
	bl	_dyn_alloc_new_msg
	mov	x21, x0
	bl	_assert
	add	x1, x19, #12
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	b	LBB0_12
LBB0_6:
	sub	w9, w8, #128
	cmp	w9, #4
	b.hi	LBB0_10
; %bb.7:
	mov	w20, #4
Lloh9:
	adrp	x8, lJTI0_0@PAGE
Lloh10:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	cmp	w21, #12
	b.lo	LBB0_1
; %bb.9:
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_dyn_user_header
	ldr	w1, [x19, #8]
	bl	_dyn_undelete_msg
	mov	w20, #12
	b	LBB0_12
LBB0_10:
Lloh11:
	adrp	x9, _stderr@GOTPAGE
Lloh12:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x9]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x8
	bl	_fprintf
LBB0_11:
	mov	w20, #-1
LBB0_12:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_13:
	cmp	w21, #8
	b.lo	LBB0_1
; %bb.14:
Lloh16:
	adrp	x8, _log_first_ts@GOTPAGE
Lloh17:
	ldr	x8, [x8, _log_first_ts@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w2, [x19, #4]
	cbnz	w9, LBB0_16
; %bb.15:
	str	w2, [x8]
LBB0_16:
Lloh18:
	adrp	x20, _log_read_until@GOTPAGE
Lloh19:
	ldr	x20, [x20, _log_read_until@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, w2
	b.le	LBB0_18
; %bb.17:
Lloh20:
	adrp	x9, _stderr@GOTPAGE
Lloh21:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x9]
	str	x2, [sp]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x8
	bl	_fprintf
	ldr	w2, [x19, #4]
LBB0_18:
	str	w2, [x20]
Lloh25:
	adrp	x8, _log_time_cutoff@GOTPAGE
Lloh26:
	ldr	x8, [x8, _log_time_cutoff@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x10, _log_scan_mode@GOTPAGE
Lloh29:
	ldr	x10, [x10, _log_scan_mode@GOTPAGEOFF]
	ldr	w9, [x10]
	cmp	w2, w8
	ccmp	w9, #0, #0, ge
	b.ne	LBB0_26
; %bb.19:
Lloh30:
	adrp	x9, _log_pos@GOTPAGE
Lloh31:
	ldr	x9, [x9, _log_pos@GOTPAGEOFF]
Lloh32:
	ldrsw	x9, [x9]
	sub	x9, x9, w21, sxtw
Lloh33:
	adrp	x11, _log_cutoff_pos@GOTPAGE
Lloh34:
	ldr	x11, [x11, _log_cutoff_pos@GOTPAGEOFF]
Lloh35:
	str	x9, [x11]
	mov	w11, #1
	str	w11, [x10]
Lloh36:
	adrp	x10, _verbosity@GOTPAGE
Lloh37:
	ldr	x10, [x10, _verbosity@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	cbz	w10, LBB0_26
; %bb.20:
Lloh39:
	adrp	x10, _stderr@GOTPAGE
Lloh40:
	ldr	x10, [x10, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x10]
	stp	x8, x9, [sp]
Lloh42:
	adrp	x1, l_.str.1@PAGE
Lloh43:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_fprintf
	mov	w20, #8
	b	LBB0_12
LBB0_21:
	cmp	w21, #12
	b.lo	LBB0_1
; %bb.22:
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_dyn_user_header
	ldr	w1, [x19, #8]
	bl	_dyn_delall_msg
	mov	w20, #12
	b	LBB0_12
LBB0_23:
	cmp	w21, #12
	b.lo	LBB0_1
; %bb.24:
Lloh44:
	adrp	x8, _log_scan_mode@GOTPAGE
Lloh45:
	ldr	x8, [x8, _log_scan_mode@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	cbz	w8, LBB0_27
; %bb.25:
	mov	w20, #12
	b	LBB0_12
LBB0_26:
	mov	w20, #8
	b	LBB0_12
LBB0_27:
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_dyn_user_header
	ldr	w1, [x19, #8]
	bl	_dyn_delete_msg
	mov	w20, #12
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_21-LBB0_8)>>2
	.byte	(LBB0_23-LBB0_8)>>2
                                        ; -- End function
	.comm	_LE_NEWMSG_MAGIC,4,2            ; @LE_NEWMSG_MAGIC
	.comm	_LE_NEWMSG_MAGIC_MAX,4,2        ; @LE_NEWMSG_MAGIC_MAX
	.comm	_log_scan_mode,4,2              ; @log_scan_mode
	.comm	_log_first_ts,4,2               ; @log_first_ts
	.comm	_log_read_until,4,2             ; @log_read_until
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"time goes back from %d to %d in log file\n"

	.comm	_log_time_cutoff,4,2            ; @log_time_cutoff
	.comm	_log_pos,4,2                    ; @log_pos
	.comm	_log_cutoff_pos,8,3             ; @log_cutoff_pos
	.comm	_verbosity,4,2                  ; @verbosity
l_.str.1:                               ; @.str.1
	.asciz	"reached timestamp %d above cutoff %d at binlog position %lld, entering scan mode 1\n"

l_.str.2:                               ; @.str.2
	.asciz	"unknown magic in log file: %08x\n"

.subsections_via_symbols
