	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_binlog                   ## -- Begin function flush_binlog
	.p2align	4, 0x90
_flush_binlog:                          ## @flush_binlog
	.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	_binlogname@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_16
## %bb.1:
	movq	_log_rptr@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_log_wptr@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_16
## %bb.2:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_now@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_4:
	movq	_log_endw@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	(%r15), %rcx
	cmpq	%rcx, (%r12)
	setl	%dl
	cmpq	%rax, %rcx
	setle	%al
	andb	%dl, %al
	movzbl	%al, %edi
	callq	_assert
	movl	(%r13), %r14d
	subl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.7:
	movq	_binlog_fd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_log_pos@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_assert
	movl	(%rbx), %edi
	movq	(%r15), %rsi
	movl	%r14d, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%eax, %ecx
	addq	%rcx, (%r15)
	movq	_log_pos@GOTPCREL(%rip), %rdx
	addq	%rcx, (%rdx)
	cmpl	%r14d, %eax
	movq	_log_endw@GOTPCREL(%rip), %r13
	movq	_binlogname@GOTPCREL(%rip), %rbx
	jb	LBB0_16
LBB0_10:
	movq	_log_start@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	$0, (%r13)
	jmp	LBB0_11
LBB0_5:
	movq	(%r15), %rax
LBB0_11:
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	setle	%dil
	callq	_assert
	movl	(%r12), %r14d
	subl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_16
## %bb.12:
	movq	_binlog_fd@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_log_pos@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_assert
	movl	(%r13), %edi
	movq	(%r15), %rsi
	movl	%r14d, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.15:
	movl	%eax, %eax
	addq	%rax, (%r15)
	addq	%rax, (%r12)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rcx
	movl	(%rbx), %r8d
	jmp	LBB0_14
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_log_pos@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_binlogname@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_binlogname,4,2                 ## @binlogname
	.comm	_log_rptr,8,3                   ## @log_rptr
	.comm	_log_wptr,8,3                   ## @log_wptr
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d flush_binlog()\n"

	.comm	_now,4,2                        ## @now
	.comm	_log_endw,8,3                   ## @log_endw
	.comm	_binlog_fd,4,2                  ## @binlog_fd
	.comm	_log_pos,8,3                    ## @log_pos
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"error writing %d bytes at %lld to %s: %m\n"

	.comm	_log_start,8,3                  ## @log_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_binlog                   ; -- Begin function flush_binlog
	.p2align	2
_flush_binlog:                          ; @flush_binlog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x20, _binlogname@GOTPAGE
Lloh1:
	ldr	x20, [x20, _binlogname@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_16
; %bb.1:
Lloh2:
	adrp	x21, _log_rptr@GOTPAGE
Lloh3:
	ldr	x21, [x21, _log_rptr@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh4:
	adrp	x22, _log_wptr@GOTPAGE
Lloh5:
	ldr	x22, [x22, _log_wptr@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.2:
Lloh6:
	adrp	x8, _verbosity@GOTPAGE
Lloh7:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _now@GOTPAGE
Lloh13:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_4:
Lloh17:
	adrp	x23, _log_endw@GOTPAGE
Lloh18:
	ldr	x23, [x23, _log_endw@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	x9, [x22]
	ldr	x10, [x21]
	cmp	x9, x10
	ccmp	x10, x8, #0, lt
	cset	w0, le
	bl	_assert
	ldr	w8, [x23]
	ldr	w9, [x21]
	sub	w19, w8, w9
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.6:
Lloh19:
	adrp	x25, _binlog_fd@GOTPAGE
Lloh20:
	ldr	x25, [x25, _binlog_fd@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh21:
	adrp	x24, _log_pos@GOTPAGE
Lloh22:
	ldr	x24, [x24, _log_pos@GOTPAGEOFF]
	ldr	x1, [x24]
Lloh23:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	bl	_lseek
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	ldr	w0, [x25]
	ldr	x1, [x21]
	mov	x2, x19
	bl	_write
	tbnz	w0, #31, LBB0_14
; %bb.7:
	mov	w8, w0
	ldr	x9, [x21]
	add	x9, x9, x8
	str	x9, [x21]
	ldr	x9, [x24]
	add	x8, x9, x8
	str	x8, [x24]
	cmp	w0, w19
	b.lo	LBB0_16
LBB0_8:
Lloh26:
	adrp	x8, _log_start@GOTPAGE
Lloh27:
	ldr	x8, [x8, _log_start@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	x8, [x21]
	str	xzr, [x23]
	b	LBB0_10
LBB0_9:
	ldr	x8, [x21]
LBB0_10:
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, le
	bl	_assert
	ldr	w8, [x22]
	ldr	w9, [x21]
	sub	w19, w8, w9
	cmp	w19, #1
	b.lt	LBB0_16
; %bb.11:
Lloh29:
	adrp	x23, _binlog_fd@GOTPAGE
Lloh30:
	ldr	x23, [x23, _binlog_fd@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh31:
	adrp	x22, _log_pos@GOTPAGE
Lloh32:
	ldr	x22, [x22, _log_pos@GOTPAGEOFF]
	ldr	x1, [x22]
Lloh33:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	bl	_lseek
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	ldr	w0, [x23]
	ldr	x1, [x21]
	mov	x2, x19
	bl	_write
	tbnz	w0, #31, LBB0_13
; %bb.12:
	mov	w8, w0
	ldr	x9, [x21]
	add	x9, x9, x8
	str	x9, [x21]
	ldr	x9, [x22]
	add	x8, x9, x8
	str	x8, [x22]
	b	LBB0_16
LBB0_13:
Lloh36:
	adrp	x8, _stderr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	ldr	x8, [x22]
	b	LBB0_15
LBB0_14:
Lloh39:
	adrp	x8, _stderr@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	ldr	x8, [x24]
LBB0_15:
	ldr	w9, [x20]
	stp	x8, x9, [sp]
Lloh42:
	adrp	x1, l_.str.1@PAGE
Lloh43:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_fprintf
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_binlogname,4,2                 ; @binlogname
	.comm	_log_rptr,8,3                   ; @log_rptr
	.comm	_log_wptr,8,3                   ; @log_wptr
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d flush_binlog()\n"

	.comm	_now,4,2                        ; @now
	.comm	_log_endw,8,3                   ; @log_endw
	.comm	_binlog_fd,4,2                  ; @binlog_fd
	.comm	_log_pos,8,3                    ; @log_pos
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"error writing %d bytes at %lld to %s: %m\n"

	.comm	_log_start,8,3                  ; @log_start
.subsections_via_symbols
