	.file	"extr_tscJoinProcess.c_tsBufFlush.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tsBufFlush
	.type	tsBufFlush, @function
tsBufFlush:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 24[rdi], 0
	jle	.L1
	mov	rbx, rdi
	call	writeDataToDisk@PLT
	lea	rdi, 24[rbx]
	call	shrinkBuffer@PLT
	movsx	rdx, DWORD PTR [rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	rdi, rbx
	mov	rsi, rdx
	lea	rdx, -4[rax+rdx*4]
	sub	esi, 1
	call	TSBufUpdateVnodeInfo@PLT
	mov	eax, DWORD PTR [rbx]
	lea	rsi, 12[rsp]
	mov	rdi, rbx
	mov	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR TS_COMP_FILE_MAGIC[rip]
	mov	DWORD PTR 20[rsp], eax
	call	STSBufUpdateHeader@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	fileno@PLT
	mov	edi, eax
	call	fsync@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L7
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tsBufFlush, .-tsBufFlush
	.comm	TS_COMP_FILE_MAGIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tscJoinProcess.c_tsBufFlush.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	tsBufFlush
	.syntax unified
	.arm
	.fpu softvfp
	.type	tsBufFlush, %function
tsBufFlush:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, [r0, #16]
	ldr	r2, .L8
	sub	sp, sp, #16
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ble	.L1
	mov	r4, r0
	bl	writeDataToDisk
	add	r0, r4, #16
	bl	shrinkBuffer
	ldr	r1, [r4]
	ldr	r3, [r4, #12]
	sub	r2, r1, #-1073741823
	add	r2, r3, r2, lsl #2
	sub	r1, r1, #1
	mov	r0, r4
	bl	TSBufUpdateVnodeInfo
	ldr	r3, .L8+4
	ldr	r2, [r4]
	ldr	ip, [r3]
	ldr	r3, [r4, #8]
	mov	r1, sp
	mov	r0, r4
	stm	sp, {r2, r3, ip}
	bl	STSBufUpdateHeader
	ldr	r0, [r4, #4]
	bl	fileno
	bl	fsync
.L1:
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	add	sp, sp, #16
	@ sp needed
	pop	{r4, pc}
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	TS_COMP_FILE_MAGIC
	.size	tsBufFlush, .-tsBufFlush
	.comm	TS_COMP_FILE_MAGIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
