	.file	"extr_rdb.c_rdbSaveKeyValuePair.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rdbSaveKeyValuePair
	.type	rdbSaveKeyValuePair, @function
rdbSaveKeyValuePair:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ebx, DWORD PTR server[rip]
	mov	r15d, DWORD PTR MAXMEMORY_FLAG_LRU[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR MAXMEMORY_FLAG_LFU[rip]
	and	r15d, ebx
	mov	DWORD PTR 12[rsp], eax
	cmp	rcx, -1
	jne	.L2
	test	r15d, r15d
	jne	.L42
.L4:
	test	DWORD PTR 12[rsp], ebx
	jne	.L9
.L10:
	mov	rsi, r13
	mov	rdi, rbp
	call	rdbSaveObjectType@PLT
	cmp	eax, -1
	je	.L11
	mov	rsi, r14
	mov	rdi, rbp
	call	rdbSaveStringObject@PLT
	cmp	eax, -1
	je	.L11
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbp
	call	rdbSaveObject@PLT
	cmp	eax, -1
	je	.L11
	mov	rdi, QWORD PTR server[rip+8]
	mov	r12d, 1
	test	rdi, rdi
	je	.L1
	call	usleep@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r13
	call	LFUDecrAndReturn@PLT
	mov	esi, DWORD PTR RDB_OPCODE_FREQ[rip]
	mov	rdi, rbp
	mov	DWORD PTR 20[rsp], eax
	call	rdbSaveType@PLT
	cmp	eax, -1
	je	.L11
	lea	rsi, 20[rsp]
	mov	edx, 1
	mov	rdi, rbp
	call	rdbWriteRaw@PLT
	cmp	eax, -1
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, -1
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L43
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR RDB_OPCODE_EXPIRETIME_MS[rip]
	mov	r12, rcx
	call	rdbSaveType@PLT
	cmp	eax, -1
	je	.L11
	mov	rsi, r12
	mov	rdi, rbp
	call	rdbSaveMillisecondTime@PLT
	cmp	eax, -1
	je	.L11
	test	r15d, r15d
	je	.L4
.L42:
	mov	rdi, r13
	call	estimateObjectIdleTime@PLT
	mov	esi, DWORD PTR RDB_OPCODE_IDLE[rip]
	mov	rdi, rbp
	mov	r12d, eax
	call	rdbSaveType@PLT
	cmp	eax, -1
	je	.L11
	movsx	rsi, r12d
	sar	r12d, 31
	mov	rdi, rbp
	imul	rsi, rsi, 274877907
	sar	rsi, 38
	sub	esi, r12d
	call	rdbSaveLen@PLT
	cmp	eax, -1
	jne	.L4
	jmp	.L11
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rdbSaveKeyValuePair, .-rdbSaveKeyValuePair
	.comm	server,16,16
	.comm	RDB_OPCODE_IDLE,4,4
	.comm	RDB_OPCODE_FREQ,4,4
	.comm	RDB_OPCODE_EXPIRETIME_MS,4,4
	.comm	MAXMEMORY_FLAG_LRU,4,4
	.comm	MAXMEMORY_FLAG_LFU,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_rdb.c_rdbSaveKeyValuePair.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rdbSaveKeyValuePair
	.syntax unified
	.arm
	.fpu softvfp
	.type	rdbSaveKeyValuePair, %function
rdbSaveKeyValuePair:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mvn	r5, #0
	mvn	r4, #0
	ldr	r3, .L43
	sub	sp, sp, #8
	ldr	r9, .L43+4
	add	r7, sp, #40
	ldmia	r7, {r6-r7}
	cmp	r7, r5
	cmpeq	r6, r4
	mov	r5, r2
	ldr	r6, [r3]
	ldr	r8, [r9]
	ldr	r3, .L43+8
	ldr	r2, .L43+12
	mov	r7, r1
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	mov	r4, r0
	ldr	r10, [r3]
	and	r6, r6, r8
	bne	.L2
	cmp	r6, #0
	bne	.L41
.L4:
	tst	r8, r10
	bne	.L9
.L10:
	mov	r1, r5
	mov	r0, r4
	bl	rdbSaveObjectType
	cmn	r0, #1
	beq	.L11
	mov	r1, r7
	mov	r0, r4
	bl	rdbSaveStringObject
	cmn	r0, #1
	beq	.L11
	mov	r2, r7
	mov	r1, r5
	mov	r0, r4
	bl	rdbSaveObject
	cmn	r0, #1
	beq	.L11
	ldr	r0, [r9, #4]
	cmp	r0, #0
	moveq	r0, #1
	beq	.L1
	bl	usleep
	mov	r0, #1
	b	.L1
.L9:
	mov	r0, r5
	bl	LFUDecrAndReturn
	mov	r3, r0
	ldr	r2, .L43+16
	mov	r0, r4
	ldr	r1, [r2]
	str	r3, [sp]
	bl	rdbSaveType
	cmn	r0, #1
	beq	.L11
	mov	r2, #1
	mov	r1, sp
	mov	r0, r4
	bl	rdbWriteRaw
	cmn	r0, #1
	bne	.L10
.L11:
	mvn	r0, #0
.L1:
	ldr	r3, .L43+12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L43+20
	ldr	r1, [r3]
	bl	rdbSaveType
	cmn	r0, #1
	beq	.L11
	add	r3, sp, #40
	ldmia	r3, {r2-r3}
	mov	r0, r4
	bl	rdbSaveMillisecondTime
	cmn	r0, #1
	beq	.L11
	cmp	r6, #0
	beq	.L4
.L41:
	mov	r0, r5
	bl	estimateObjectIdleTime
	ldr	r3, .L43+24
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	rdbSaveType
	cmn	r0, #1
	beq	.L11
	ldr	r3, .L43+28
	asr	r1, r6, #31
	smull	r2, r6, r3, r6
	mov	r0, r4
	rsb	r1, r1, r6, asr #6
	bl	rdbSaveLen
	cmn	r0, #1
	bne	.L4
	b	.L11
.L42:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	MAXMEMORY_FLAG_LRU
	.word	server
	.word	MAXMEMORY_FLAG_LFU
	.word	.LC0
	.word	RDB_OPCODE_FREQ
	.word	RDB_OPCODE_EXPIRETIME_MS
	.word	RDB_OPCODE_IDLE
	.word	274877907
	.size	rdbSaveKeyValuePair, .-rdbSaveKeyValuePair
	.comm	server,8,4
	.comm	RDB_OPCODE_IDLE,4,4
	.comm	RDB_OPCODE_FREQ,4,4
	.comm	RDB_OPCODE_EXPIRETIME_MS,4,4
	.comm	MAXMEMORY_FLAG_LRU,4,4
	.comm	MAXMEMORY_FLAG_LFU,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
