	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_binlog_flush                   ## -- Begin function binlog_flush
	.p2align	4, 0x90
_binlog_flush:                          ## @binlog_flush
	.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_BUFFER_WPTR@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	_BINLOG_BUFFER_FPTR@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rsi
	je	LBB0_2
## %bb.1:
	setg	%al
	movzbl	%al, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_get_double_time_since_epoch
	movq	_STATS@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	subl	%eax, (%rcx)
	movq	_BINLOG_BUFFER_FD@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_BINLOG_POSITION@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	subq	(%r14), %rsi
	addq	(%r13), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	movq	(%rbx), %rcx
	subq	(%r14), %rcx
	addq	(%r13), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_assert
	movl	(%r12), %edi
	movq	(%r13), %rsi
	movq	(%r14), %rdx
	subq	%rsi, %rdx
	callq	_write
	movq	(%r14), %rcx
	subq	(%r13), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	sete	%dil
	callq	_assert
	movl	(%r12), %edi
	callq	_fsync
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_get_double_time_since_epoch
	movq	(%r15), %rcx
	addl	%eax, (%rcx)
	movq	(%r14), %rsi
	movq	%rsi, (%r13)
LBB0_2:
	movq	_BINLOG_BUFFER@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_BINLOG_BUFFER_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	leaq	(%rdx,%rdi), %rax
	cmpq	%rax, %rsi
	jle	LBB0_4
## %bb.3:
	subq	%rdx, %rsi
	callq	_memcpy
	movq	(%rbx), %rax
	addq	(%r15), %rax
	movq	%rax, (%r14)
	movq	%rax, (%r13)
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BINLOG_BUFFER_WPTR,8,3         ## @BINLOG_BUFFER_WPTR
	.comm	_BINLOG_BUFFER_FPTR,8,3         ## @BINLOG_BUFFER_FPTR
	.comm	_STATS,8,3                      ## @STATS
	.comm	_BINLOG_BUFFER_FD,4,2           ## @BINLOG_BUFFER_FD
	.comm	_BINLOG_POSITION,8,3            ## @BINLOG_POSITION
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_BINLOG_BUFFER,8,3              ## @BINLOG_BUFFER
	.comm	_BINLOG_BUFFER_SIZE,8,3         ## @BINLOG_BUFFER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_binlog_flush                   ; -- Begin function binlog_flush
	.p2align	2
_binlog_flush:                          ; @binlog_flush
	.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
Lloh0:
	adrp	x19, _BINLOG_BUFFER_WPTR@GOTPAGE
Lloh1:
	ldr	x19, [x19, _BINLOG_BUFFER_WPTR@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x20, _BINLOG_BUFFER_FPTR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _BINLOG_BUFFER_FPTR@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	cset	w0, gt
	bl	_assert
	bl	_get_double_time_since_epoch
Lloh4:
	adrp	x21, _STATS@GOTPAGE
Lloh5:
	ldr	x21, [x21, _STATS@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w9, [x8]
	sub	w9, w9, w0
Lloh6:
	adrp	x22, _BINLOG_BUFFER_FD@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BINLOG_BUFFER_FD@GOTPAGEOFF]
	str	w9, [x8]
	ldr	w0, [x22]
Lloh8:
	adrp	x23, _BINLOG_POSITION@GOTPAGE
Lloh9:
	ldr	x23, [x23, _BINLOG_POSITION@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	x10, [x20]
	sub	x8, x8, x9
	add	x1, x8, x10
Lloh10:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_lseek
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	x10, [x20]
	sub	x8, x8, x9
	add	x8, x8, x10
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	ldr	w0, [x22]
	ldr	x1, [x20]
	ldr	x8, [x19]
	sub	x2, x8, x1
	bl	_write
	ldr	x8, [x19]
	ldr	x9, [x20]
	sub	x8, x8, x9
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	ldr	w0, [x22]
	bl	_fsync
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	bl	_get_double_time_since_epoch
	ldr	x8, [x21]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
	ldr	x8, [x19]
	str	x8, [x20]
LBB0_2:
Lloh13:
	adrp	x21, _BINLOG_BUFFER@GOTPAGE
Lloh14:
	ldr	x21, [x21, _BINLOG_BUFFER@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh15:
	adrp	x22, _BINLOG_BUFFER_SIZE@GOTPAGE
Lloh16:
	ldr	x22, [x22, _BINLOG_BUFFER_SIZE@GOTPAGEOFF]
	ldr	x2, [x22]
	add	x9, x2, x0
	cmp	x8, x9
	b.le	LBB0_4
; %bb.3:
	sub	x1, x8, x2
	bl	_memcpy
	ldr	x8, [x21]
	ldr	x9, [x22]
	add	x8, x9, x8
	str	x8, [x19]
	str	x8, [x20]
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BINLOG_BUFFER_WPTR,8,3         ; @BINLOG_BUFFER_WPTR
	.comm	_BINLOG_BUFFER_FPTR,8,3         ; @BINLOG_BUFFER_FPTR
	.comm	_STATS,8,3                      ; @STATS
	.comm	_BINLOG_BUFFER_FD,4,2           ; @BINLOG_BUFFER_FD
	.comm	_BINLOG_POSITION,8,3            ; @BINLOG_POSITION
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_BINLOG_BUFFER,8,3              ; @BINLOG_BUFFER
	.comm	_BINLOG_BUFFER_SIZE,8,3         ; @BINLOG_BUFFER_SIZE
.subsections_via_symbols
