	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_buffer                   ## -- Begin function flush_buffer
	.p2align	4, 0x90
_flush_buffer:                          ## @flush_buffer
	.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	_bufpos@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_buffer@GOTPCREL(%rip), %r13
	subl	(%r13), %ebx
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	callq	_ftello
	cmpq	$-1, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movl	(%r13), %edi
	movl	$1, %r14d
	movl	%ebx, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fwrite
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_set_suspended
	movl	(%r13), %eax
	movq	_bufpos@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_buflen@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_bufleft@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_bufpkt@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_3:
	movl	$1, %r14d
	movl	$1, %edi
	callq	_set_suspended
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_logmsg
	jmp	LBB0_7
LBB0_5:
	movl	$1, %edi
	callq	_set_suspended
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_logmsg
	movq	%r12, %rdi
	callq	_fileno
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_ftruncate
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bufpos,4,2                     ## @bufpos
	.comm	_buffer,4,2                     ## @buffer
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Logging suspended: ftello: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"Logging suspended: fwrite: %s"

	.comm	_buflen,4,2                     ## @buflen
	.comm	_bufleft,4,2                    ## @bufleft
	.comm	_bufpkt,8,3                     ## @bufpkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush_buffer                   ; -- Begin function flush_buffer
	.p2align	2
_flush_buffer:                          ; @flush_buffer
	.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	x22, _bufpos@GOTPAGE
Lloh1:
	ldr	x22, [x22, _bufpos@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _buffer@GOTPAGE
Lloh3:
	ldr	x23, [x23, _buffer@GOTPAGEOFF]
	ldr	w9, [x23]
	sub	w19, w8, w9
	cmp	w19, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_ftello
	cmn	x0, #1
	b.eq	LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	w0, [x23]
	mov	x1, x19
	mov	w2, #1
	mov	x3, x20
	bl	_fwrite
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #0
	bl	_set_suspended
	mov	w19, #0
	ldr	w8, [x23]
	str	w8, [x22]
Lloh4:
	adrp	x8, _buflen@GOTPAGE
Lloh5:
	ldr	x8, [x8, _buflen@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _bufleft@GOTPAGE
Lloh8:
	ldr	x9, [x9, _bufleft@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
Lloh10:
	adrp	x8, _bufpkt@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bufpkt@GOTPAGEOFF]
Lloh12:
	str	xzr, [x8]
	b	LBB0_7
LBB0_4:
	mov	w19, #0
	b	LBB0_7
LBB0_5:
	mov	w19, #1
	mov	w0, #1
	bl	_set_suspended
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_logmsg
	b	LBB0_7
LBB0_6:
	mov	w19, #1
	mov	w0, #1
	bl	_set_suspended
Lloh21:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh23:
	ldr	w22, [x8]
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_logmsg
	mov	x0, x20
	bl	_fileno
	mov	x1, x21
	bl	_ftruncate
LBB0_7:
	mov	x0, x19
	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 AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_bufpos,4,2                     ; @bufpos
	.comm	_buffer,4,2                     ; @buffer
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Logging suspended: ftello: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"Logging suspended: fwrite: %s"

	.comm	_buflen,4,2                     ; @buflen
	.comm	_bufleft,4,2                    ; @bufleft
	.comm	_bufpkt,8,3                     ; @bufpkt
.subsections_via_symbols
