	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_clear_write_log                ## -- Begin function clear_write_log
	.p2align	4, 0x90
_clear_write_log:                       ## @clear_write_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_binlog_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_SLOG_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movq	_LogSlaveBuffer@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_2:
	movq	_binlog_write_active@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_flush_binlog
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_usleep
	decl	%ebx
	cmpl	$-301, %ebx                     ## imm = 0xFED3
	jne	LBB0_3
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$3, %edi
	callq	_exit
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	negl	%ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movq	_aio_write_start@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_assert
	movq	_ULOG_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movq	_LogBuffer@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	_W@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_clear_one_log                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_binlog_disabled,8,3            ## @binlog_disabled
	.comm	_W,4,2                          ## @W
	.comm	_LogSlaveBuffer,4,2             ## @LogSlaveBuffer
	.comm	_SLOG_BUFFER_SIZE,4,2           ## @SLOG_BUFFER_SIZE
	.comm	_binlog_write_active,8,3        ## @binlog_write_active
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot write binlog for 3 seconds!"

L_.str.1:                               ## @.str.1
	.asciz	"clear_write_log: had to wait %d milliseconds for aio_write termination\n"

	.comm	_aio_write_start,4,2            ## @aio_write_start
	.comm	_LogBuffer,4,2                  ## @LogBuffer
	.comm	_ULOG_BUFFER_SIZE,4,2           ## @ULOG_BUFFER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_clear_write_log                ; -- Begin function clear_write_log
	.p2align	2
_clear_write_log:                       ; @clear_write_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _binlog_disabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _binlog_disabled@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _SLOG_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SLOG_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _LogSlaveBuffer@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LogSlaveBuffer@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	w19, #0
Lloh7:
	adrp	x20, _binlog_write_active@GOTPAGE
Lloh8:
	ldr	x20, [x20, _binlog_write_active@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_flush_binlog
	mov	w0, #10000
	bl	_usleep
	sub	w19, w19, #1
	cmn	w19, #301
	b.ne	LBB0_3
; %bb.5:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #3
	bl	_exit
LBB0_6:
	cbz	w19, LBB0_8
; %bb.7:
	neg	w8, w19
Lloh14:
	adrp	x9, _stderr@GOTPAGE
Lloh15:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_8:
Lloh19:
	adrp	x8, _aio_write_start@GOTPAGE
Lloh20:
	ldr	x8, [x8, _aio_write_start@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
Lloh22:
	adrp	x8, _ULOG_BUFFER_SIZE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ULOG_BUFFER_SIZE@GOTPAGEOFF]
Lloh24:
	adrp	x9, _LogBuffer@GOTPAGE
Lloh25:
	ldr	x9, [x9, _LogBuffer@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x9]
	ldr	w2, [x8]
Lloh26:
	adrp	x0, _W@GOTPAGE
Lloh27:
	ldr	x0, [x0, _W@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_clear_one_log
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_binlog_disabled,8,3            ; @binlog_disabled
	.comm	_W,4,2                          ; @W
	.comm	_LogSlaveBuffer,4,2             ; @LogSlaveBuffer
	.comm	_SLOG_BUFFER_SIZE,4,2           ; @SLOG_BUFFER_SIZE
	.comm	_binlog_write_active,8,3        ; @binlog_write_active
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot write binlog for 3 seconds!"

l_.str.1:                               ; @.str.1
	.asciz	"clear_write_log: had to wait %d milliseconds for aio_write termination\n"

	.comm	_aio_write_start,4,2            ; @aio_write_start
	.comm	_LogBuffer,4,2                  ; @LogBuffer
	.comm	_ULOG_BUFFER_SIZE,4,2           ; @ULOG_BUFFER_SIZE
.subsections_via_symbols
