	.file	"extr_lsm_log.c_lsmLogWrite.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	lsmLogWrite
	.type	lsmLogWrite, @function
lsmLogWrite:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movsx	r13, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movsx	r12, r9d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	edi, 1
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR [rsp], rdx
	mov	QWORD PTR 8[rsp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR LSM_WRITE[rip], esi
	mov	DWORD PTR 36[rsp], 0
	je	.L2
	cmp	DWORD PTR LSM_DELETE[rip], esi
	je	.L2
	xor	edi, edi
	cmp	DWORD PTR LSM_DRANGE[rip], esi
	sete	dil
.L2:
	call	assert@PLT
	mov	eax, DWORD PTR LSM_WRITE[rip]
	xor	edi, edi
	cmp	DWORD PTR LSM_LOG_WRITE[rip], eax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR LSM_DELETE[rip]
	xor	edi, edi
	cmp	DWORD PTR LSM_LOG_DELETE[rip], eax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR LSM_DRANGE[rip]
	xor	edi, edi
	cmp	DWORD PTR LSM_LOG_DRANGE[rip], eax
	sete	dil
	call	assert@PLT
	cmp	DWORD PTR LSM_LOG_DELETE[rip], ebx
	mov	eax, r12d
	setne	dil
	shr	eax, 31
	xor	edi, eax
	movzx	edi, dil
	call	assert@PLT
	cmp	QWORD PTR 0[rbp], 0
	mov	r8d, DWORD PTR LSM_OK[rip]
	jne	.L15
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edi, r13d
	mov	r15, QWORD PTR 8[rbp]
	call	lsmVarintLen32@PLT
	cmp	DWORD PTR LSM_LOG_DELETE[rip], ebx
	lea	r14d, 9[r13+rax]
	je	.L5
	mov	edi, r12d
	call	lsmVarintLen32@PLT
	add	eax, r12d
	add	r14d, eax
.L5:
	lea	rcx, 36[rsp]
	mov	edx, r14d
	mov	rsi, r15
	mov	rdi, rbp
	call	jumpIfRequired@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR [r15]
	add	eax, r14d
	cmp	eax, DWORD PTR LSM_CKSUM_MAXDATA[rip]
	jle	.L6
	mov	DWORD PTR 36[rsp], 1
.L6:
	cmp	DWORD PTR LSM_OK[rip], r8d
	jne	.L1
	mov	esi, r14d
	mov	rdi, r15
	call	lsmStringExtend@PLT
	cmp	DWORD PTR LSM_OK[rip], eax
	mov	r8d, eax
	jne	.L1
	movsx	rdx, DWORD PTR [r15]
	mov	DWORD PTR 28[rsp], eax
	xor	edi, edi
	mov	rax, QWORD PTR 8[r15]
	lea	rcx, [rax+rdx*4]
	mov	eax, DWORD PTR LSM_LOG_WRITE[rip]
	mov	QWORD PTR 16[rsp], rcx
	or	eax, 1
	cmp	eax, DWORD PTR LSM_LOG_WRITE_CKSUM[rip]
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR LSM_LOG_DELETE[rip]
	xor	edi, edi
	or	eax, 1
	cmp	eax, DWORD PTR LSM_LOG_DELETE_CKSUM[rip]
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR LSM_LOG_DRANGE[rip]
	xor	edi, edi
	or	eax, 1
	cmp	eax, DWORD PTR LSM_LOG_DRANGE_CKSUM[rip]
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR 36[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	mov	esi, r13d
	or	eax, ebx
	lea	rdx, 4[rcx]
	mov	DWORD PTR [rcx], eax
	mov	rdi, rdx
	mov	QWORD PTR 16[rsp], rdx
	call	lsmVarintPut32@PLT
	mov	rdx, QWORD PTR 16[rsp]
	cmp	DWORD PTR LSM_LOG_DELETE[rip], ebx
	cdqe
	mov	r8d, DWORD PTR 28[rsp]
	lea	rcx, [rdx+rax*4]
	je	.L7
	mov	rdi, rcx
	mov	esi, r12d
	mov	QWORD PTR 16[rsp], rcx
	call	lsmVarintPut32@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	r8d, DWORD PTR 28[rsp]
	cdqe
	lea	rcx, [rcx+rax*4]
.L7:
	mov	eax, DWORD PTR 36[rsp]
	test	eax, eax
	jne	.L17
.L8:
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rcx
	mov	edx, r13d
	mov	DWORD PTR 16[rsp], r8d
	mov	QWORD PTR [rsp], rcx
	call	memcpy@PLT
	mov	rcx, QWORD PTR [rsp]
	cmp	DWORD PTR LSM_LOG_DELETE[rip], ebx
	mov	r8d, DWORD PTR 16[rsp]
	lea	rbp, [rcx+r13*4]
	je	.L9
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, rbp
	mov	edx, r12d
	mov	DWORD PTR [rsp], r8d
	lea	rbp, 0[rbp+r12*4]
	call	memcpy@PLT
	mov	r8d, DWORD PTR [rsp]
.L9:
	sub	rbp, QWORD PTR 8[r15]
	xor	edi, edi
	mov	DWORD PTR [rsp], r8d
	sar	rbp, 2
	cmp	ebp, DWORD PTR 4[r15]
	mov	DWORD PTR [r15], ebp
	setle	dil
	call	assert@PLT
	mov	r8d, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	sub	rcx, QWORD PTR 8[r15]
	mov	rdi, rbp
	sar	rcx, 2
	mov	DWORD PTR [r15], ecx
	call	logCksumAndFlush@PLT
	movsx	rdx, DWORD PTR [r15]
	mov	r8d, eax
	mov	rax, QWORD PTR 8[r15]
	lea	rcx, [rax+rdx*4]
	jmp	.L8
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lsmLogWrite, .-lsmLogWrite
	.comm	LSM_WRITE,4,4
	.comm	LSM_OK,4,4
	.comm	LSM_LOG_WRITE_CKSUM,4,4
	.comm	LSM_LOG_WRITE,4,4
	.comm	LSM_LOG_DRANGE_CKSUM,4,4
	.comm	LSM_LOG_DRANGE,4,4
	.comm	LSM_LOG_DELETE_CKSUM,4,4
	.comm	LSM_LOG_DELETE,4,4
	.comm	LSM_DRANGE,4,4
	.comm	LSM_DELETE,4,4
	.comm	LSM_CKSUM_MAXDATA,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_lsm_log.c_lsmLogWrite.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	lsmLogWrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	lsmLogWrite, %function
lsmLogWrite:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	mov	r1, #0
	ldr	r7, .L20
	sub	sp, sp, #28
	mov	r6, r3
	ldr	r3, .L20+4
	mov	r5, r0
	str	r2, [sp, #4]
	ldr	r0, [r7]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r3, [sp, #64]
	cmp	r0, r4
	str	r1, [sp, #16]
	str	r3, [sp, #8]
	beq	.L11
	ldr	r9, .L20+8
	ldr	r3, [r9]
	cmp	r3, r4
	beq	.L12
	ldr	r3, .L20+12
	ldr	r0, [r3]
	sub	r0, r0, r4
	clz	r0, r0
	lsr	r0, r0, #5
.L2:
	ldr	fp, .L20+16
	str	r3, [sp]
	bl	assert
	ldr	r2, [r7]
	ldr	r0, [fp]
	ldr	r8, .L20+20
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r2, [r9]
	ldr	r0, [r8]
	ldr	r10, .L20+24
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [sp]
	ldr	r0, [r10]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [sp, #68]
	ldr	r0, [r8]
	lsr	r3, r3, #31
	cmp	r0, r4
	moveq	r0, r3
	eorne	r0, r3, #1
	bl	assert
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L20+28
	ldr	r3, [r3]
.L1:
	ldr	r2, .L20+4
	ldr	r1, [r2]
	ldr	r2, [sp, #20]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L18
	mov	r0, r3
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r0, #1
	ldr	r3, .L20+12
	b	.L2
.L3:
	mov	r0, r6
	ldr	r9, [r5, #4]
	bl	lsmVarintLen32
	ldr	r3, [r8]
	add	r7, r0, #9
	cmp	r3, r4
	add	r7, r7, r6
	beq	.L5
	ldr	r0, [sp, #68]
	bl	lsmVarintLen32
	ldr	r3, [sp, #68]
	add	r0, r0, r3
	add	r7, r7, r0
.L5:
	mov	r2, r7
	mov	r1, r9
	add	r3, sp, #16
	mov	r0, r5
	bl	jumpIfRequired
	ldr	r3, .L20+32
	ldr	r2, [r9]
	ldr	r3, [r3]
	add	r2, r7, r2
	cmp	r2, r3
	movgt	r2, #1
	strgt	r2, [sp, #16]
	ldr	r2, .L20+28
	mov	r3, r0
	ldr	r1, [r2]
	cmp	r1, r0
	bne	.L1
	mov	r1, r7
	mov	r0, r9
	bl	lsmStringExtend
	ldr	r2, .L20+28
	mov	r3, r0
	ldr	r2, [r2]
	cmp	r2, r0
	bne	.L1
	ldr	r1, .L20+36
	ldr	r2, [fp]
	str	r0, [sp, #12]
	ldr	r0, [r1]
	orr	r2, r2, #1
	sub	r0, r2, r0
	clz	r0, r0
	ldr	r2, [r9, #8]
	lsr	r0, r0, #5
	str	r2, [sp]
	ldr	fp, [r9]
	bl	assert
	ldr	r0, .L20+40
	ldr	r1, [r8]
	ldr	r0, [r0]
	orr	r1, r1, #1
	sub	r0, r1, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, .L20+44
	ldr	r1, [r10]
	ldr	r0, [r0]
	orr	r1, r1, #1
	sub	r0, r1, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r2, [sp]
	ldr	r1, [sp, #16]
	add	r7, r2, fp, lsl #2
	orr	r1, r1, r4
	add	r7, r7, #4
	str	r1, [r2, fp, lsl #2]
	mov	r0, r7
	mov	r1, r6
	bl	lsmVarintPut32
	ldr	r2, [r8]
	ldr	r3, [sp, #12]
	cmp	r2, r4
	add	r7, r7, r0, lsl #2
	beq	.L7
	mov	r0, r7
	ldr	r1, [sp, #68]
	str	r3, [sp]
	bl	lsmVarintPut32
	ldr	r3, [sp]
	add	r7, r7, r0, lsl #2
.L7:
	ldr	r2, [sp, #16]
	cmp	r2, #0
	bne	.L19
.L8:
	mov	r2, r6
	mov	r0, r7
	ldr	r1, [sp, #4]
	str	r3, [sp]
	bl	memcpy
	ldr	r2, [r8]
	ldr	r3, [sp]
	cmp	r2, r4
	add	r6, r7, r6, lsl #2
	beq	.L9
	mov	r0, r6
	ldr	r1, [sp, #8]
	ldr	r2, [sp, #68]
	bl	memcpy
	ldr	r3, [sp, #68]
	add	r6, r6, r3, lsl #2
	ldr	r3, [sp]
.L9:
	ldmib	r9, {r0, r7}
	sub	r6, r6, r7
	asr	r6, r6, #2
	cmp	r6, r0
	movgt	r0, #0
	movle	r0, #1
	str	r6, [r9]
	str	r3, [sp]
	bl	assert
	ldr	r3, [sp]
	b	.L1
.L11:
	mov	r0, #1
	ldr	r9, .L20+8
	ldr	r3, .L20+12
	b	.L2
.L19:
	ldr	r3, [r9, #8]
	mov	r0, r5
	sub	r7, r7, r3
	asr	r7, r7, #2
	str	r7, [r9]
	bl	logCksumAndFlush
	ldr	r7, [r9, #8]
	mov	r3, r0
	ldr	r0, [r9]
	add	r7, r7, r0, lsl #2
	b	.L8
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	LSM_WRITE
	.word	.LC0
	.word	LSM_DELETE
	.word	LSM_DRANGE
	.word	LSM_LOG_WRITE
	.word	LSM_LOG_DELETE
	.word	LSM_LOG_DRANGE
	.word	LSM_OK
	.word	LSM_CKSUM_MAXDATA
	.word	LSM_LOG_WRITE_CKSUM
	.word	LSM_LOG_DELETE_CKSUM
	.word	LSM_LOG_DRANGE_CKSUM
	.size	lsmLogWrite, .-lsmLogWrite
	.comm	LSM_WRITE,4,4
	.comm	LSM_OK,4,4
	.comm	LSM_LOG_WRITE_CKSUM,4,4
	.comm	LSM_LOG_WRITE,4,4
	.comm	LSM_LOG_DRANGE_CKSUM,4,4
	.comm	LSM_LOG_DRANGE,4,4
	.comm	LSM_LOG_DELETE_CKSUM,4,4
	.comm	LSM_LOG_DELETE,4,4
	.comm	LSM_DRANGE,4,4
	.comm	LSM_DELETE,4,4
	.comm	LSM_CKSUM_MAXDATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
