	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tl_binlog_wait_time_on_complete ## -- Begin function tl_binlog_wait_time_on_complete
	.p2align	4, 0x90
_tl_binlog_wait_time_on_complete:       ## @tl_binlog_wait_time_on_complete
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	addq	$20, %rdi
	callq	_remove_event_timer
	decl	4(%r14)
	movl	16(%rbx), %edi
	callq	_lookup_binlog_time
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_assert
	xorl	%eax, %eax
	callq	_log_last_pos
	cmpq	%r15, %rax
	jge	LBB0_3
## %bb.1:
	cmpl	$0, (%r14)
	je	LBB0_2
LBB0_3:
	cmpl	$0, 4(%r14)
	jne	LBB0_5
LBB0_4:
	cmpl	$0, (%r14)
	jne	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_finished_query             ## TAILCALL
LBB0_2:
	movq	(%rbx), %rdx
	addq	8(%rbx), %rdx
	movq	_precise_now@GOTPCREL(%rip), %rax
	subq	(%rax), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_tl_binlog_wait_pos_add
	cmpl	$0, 4(%r14)
	je	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_precise_now,8,3                ## @precise_now
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tl_binlog_wait_time_on_complete ; -- Begin function tl_binlog_wait_time_on_complete
	.p2align	2
_tl_binlog_wait_time_on_complete:       ; @tl_binlog_wait_time_on_complete
	.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	x20, x0
	ldr	x19, [x0, #24]
	add	x0, x0, #20
	bl	_remove_event_timer
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	ldr	w0, [x20, #16]
	bl	_lookup_binlog_time
	mov	x21, x0
	cmp	x0, #0
	cset	w0, gt
	bl	_assert
	bl	_log_last_pos
	cmp	x0, x21
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_5
LBB0_2:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_6
LBB0_3:
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.4:
	mov	x0, x19
	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	_add_finished_query
LBB0_5:
	ldp	x9, x8, [x20]
Lloh0:
	adrp	x10, _precise_now@GOTPAGE
Lloh1:
	ldr	x10, [x10, _precise_now@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x8, x9, x8
	sub	x2, x8, x10
	mov	x0, x19
	mov	x1, x21
	bl	_tl_binlog_wait_pos_add
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_3
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_precise_now,8,3                ; @precise_now
.subsections_via_symbols
