	.file	"extr_gzlog.c_gzlog_write.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	".add"
	.text
	.p2align 4
	.globl	gzlog_write
	.type	gzlog_write, @function
gzlog_write:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L20
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	mov	esi, DWORD PTR LOGID[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	edi, DWORD PTR 20[rdi]
	call	strcmp@PLT
	test	rax, rax
	jne	.L4
	test	r13, r13
	je	.L11
	test	r12, r12
	je	.L11
	mov	rdi, rbp
	call	log_check@PLT
	test	rax, rax
	je	.L10
	mov	rdi, rbp
	call	log_open@PLT
	test	rax, rax
	jne	.L8
.L10:
	mov	edi, DWORD PTR 16[rbp]
	lea	rsi, .LC0[rip]
	call	strcpy@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR O_WRONLY[rip]
	mov	edx, 420
	or	esi, DWORD PTR O_CREAT[rip]
	or	esi, DWORD PTR O_TRUNC[rip]
	call	open@PLT
	mov	r14d, eax
	test	eax, eax
	js	.L8
	mov	rdx, r12
	mov	rsi, r13
	mov	edi, eax
	call	write@PLT
	mov	edi, r14d
	mov	rbx, rax
	call	close@PLT
	xor	edx, edx
	cmp	r12, rbx
	setne	dl
	or	edx, eax
	jne	.L8
	mov	rdi, rbp
	call	log_touch@PLT
	mov	esi, DWORD PTR APPEND_OP[rip]
	mov	rdi, rbp
	call	log_mark@PLT
	test	rax, rax
	jne	.L8
	mov	edi, 8
	call	BAIL@PLT
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	log_append@PLT
	test	rax, rax
	jne	.L8
	mov	edx, DWORD PTR 8[rbp]
	mov	eax, DWORD PTR 0[rbp]
	sub	eax, DWORD PTR 4[rbp]
	sar	eax, 10
	sar	edx, 10
	add	eax, edx
	cmp	eax, DWORD PTR TRIGGER[rip]
	jl	.L11
	pop	rbx
	.cfi_remember_state
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	gzlog_compress@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, -3
	jmp	.L1
.L20:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	mov	eax, -3
	ret
	.cfi_endproc
.LFE0:
	.size	gzlog_write, .-gzlog_write
	.comm	TRIGGER,4,4
	.comm	O_WRONLY,4,4
	.comm	O_TRUNC,4,4
	.comm	O_CREAT,4,4
	.comm	LOGID,4,4
	.comm	APPEND_OP,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_gzlog.c_gzlog_write.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	".add\000"
	.text
	.align	2
	.global	gzlog_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	gzlog_write, %function
gzlog_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r0, #0
	beq	.L4
	ldr	r3, .L18
	mov	r8, r1
	ldr	r0, [r4, #20]
	ldr	r1, [r3]
	mov	r5, r2
	bl	strcmp
	subs	r7, r0, #0
	bne	.L4
	cmp	r5, #0
	cmpne	r8, #0
	bne	.L17
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	mov	r0, r4
	bl	log_check
	cmp	r0, #0
	beq	.L9
	mov	r0, r4
	bl	log_open
	cmp	r0, #0
	bne	.L7
.L9:
	ldr	r1, .L18+4
	ldr	r0, [r4, #16]
	bl	strcpy
	ldr	r3, .L18+8
	ldr	r2, .L18+12
	ldr	r1, .L18+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r0, [r4, #12]
	mov	r2, #420
	orr	r1, r3, r1
	bl	open
	subs	r6, r0, #0
	blt	.L7
	mov	r2, r5
	mov	r1, r8
	bl	write
	mov	r3, r0
	mov	r0, r6
	mov	r6, r3
	bl	close
	cmp	r5, r6
	orrne	r0, r0, #1
	cmp	r0, #0
	bne	.L7
	mov	r0, r4
	bl	log_touch
	ldr	r3, .L18+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	log_mark
	cmp	r0, #0
	bne	.L7
	mov	r0, #8
	bl	BAIL
	mov	r2, r5
	mov	r1, r8
	mov	r0, r4
	bl	log_append
	cmp	r0, #0
	bne	.L7
	ldmib	r4, {r0, r3}
	ldr	r2, [r4]
	ldr	r1, .L18+24
	sub	r2, r2, r0
	ldr	r1, [r1]
	asr	r3, r3, #10
	add	r3, r3, r2, asr #10
	cmp	r3, r1
	blt	.L1
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	gzlog_compress
.L7:
	mvn	r7, #0
	b	.L1
.L4:
	mvn	r7, #2
	b	.L1
.L19:
	.align	2
.L18:
	.word	LOGID
	.word	.LC0
	.word	O_WRONLY
	.word	O_CREAT
	.word	O_TRUNC
	.word	APPEND_OP
	.word	TRIGGER
	.size	gzlog_write, .-gzlog_write
	.comm	TRIGGER,4,4
	.comm	O_WRONLY,4,4
	.comm	O_TRUNC,4,4
	.comm	O_CREAT,4,4
	.comm	LOGID,4,4
	.comm	APPEND_OP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
