	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memcache_store                 ## -- Begin function memcache_store
	.p2align	4, 0x90
_memcache_store:                        ## @memcache_store
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cmd_set@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	_SEC_IN_MONTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r9d, %r9d
	je	LBB0_4
## %bb.1:
	cmpl	%r9d, %r13d
	jge	LBB0_2
## %bb.3:
	movq	_now@GOTPCREL(%rip), %rax
	subl	(%rax), %r9d
	cmpl	%r13d, %r9d
	cmovll	%r9d, %r13d
	jmp	LBB0_4
LBB0_2:
	movl	%r9d, %r13d
LBB0_4:
	movl	$-2, %r12d
	testl	%r13d, %r13d
	js	LBB0_18
## %bb.5:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r14d
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_utime
	addl	%eax, %r13d
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_7
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
LBB0_7:
	movq	_MAX_VALUE_LEN@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jle	LBB0_18
## %bb.8:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_get_hash
	movq	%rax, %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_get_entry
	movl	%eax, %r15d
	xorl	%edi, %edi
	callq	_ADD_OPER
	cmpl	$-1, %r15d
	je	LBB0_13
## %bb.9:
	movq	_mct_add@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_18
## %bb.10:
	movl	%r15d, %edx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%r15d, %r14d
	jle	LBB0_12
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_12:
	movl	%r14d, %edi
	callq	_get_entry_ptr
	movq	%rax, %r12
	movq	40(%rax), %rdi
	movl	(%rax), %esi
	incl	%esi
	callq	_zzfree
	movl	%r14d, %edi
	callq	_del_entry_used
	movl	%r14d, %edi
	callq	_del_entry_time
	jmp	LBB0_17
LBB0_13:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_mct_replace@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_18
## %bb.14:
	movq	_total_items@GOTPCREL(%rip), %rax
	incl	(%rax)
	xorl	%eax, %eax
	callq	_get_new_entry
	movl	%eax, %r14d
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_16
## %bb.15:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_16:
	movl	%r14d, %edi
	callq	_get_entry_ptr
	movq	%rax, %r12
	leal	1(%rbx), %edi
	callq	_zzmalloc
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	movb	$0, (%r15,%rax)
	movq	%r15, 8(%r12)
	movl	%ebx, 16(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r12)
	movl	%r14d, %edi
	callq	_add_entry
LBB0_17:
	movl	16(%rbp), %ebx
	leal	1(%rbx), %edi
	callq	_zzmalloc
	movq	%rax, 40(%r12)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_read_in
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	sete	%dil
	callq	_assert
	movq	40(%r12), %rax
	movslq	%ebx, %rcx
	movq	$0, (%rax,%rcx,8)
	movl	%ebx, (%r12)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 32(%r12)
	movl	%r13d, 36(%r12)
	movl	%r14d, %edi
	callq	_add_entry_used
	movl	%r14d, %edi
	callq	_add_entry_time
	movl	$1, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cmd_set,4,2                    ## @cmd_set
	.comm	_SEC_IN_MONTH,4,2               ## @SEC_IN_MONTH
	.comm	_now,8,3                        ## @now
	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memcache_store: key='%s', key_len=%d, value_len=%d, flags = %d, exp_time = %d\n"

	.comm	_MAX_VALUE_LEN,4,2              ## @MAX_VALUE_LEN
	.comm	_mct_add,4,2                    ## @mct_add
L_.str.1:                               ## @.str.1
	.asciz	"found old entry x = %d\n"

	.comm	_mct_replace,4,2                ## @mct_replace
	.comm	_total_items,4,2                ## @total_items
L_.str.2:                               ## @.str.2
	.asciz	"created new entry x = %d\n"

	.comm	_stats_now,8,3                  ## @stats_now
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memcache_store                 ; -- Begin function memcache_store
	.p2align	2
_memcache_store:                        ; @memcache_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x6
	mov	x20, x4
	mov	x22, x3
	mov	x24, x2
	mov	x25, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _cmd_set@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cmd_set@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x8, _SEC_IN_MONTH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEC_IN_MONTH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w5, LBB0_4
; %bb.1:
	mov	x23, x5
	cmp	w8, w5
	b.ge	LBB0_3
; %bb.2:
Lloh5:
	adrp	x9, _now@GOTPAGE
Lloh6:
	ldr	x9, [x9, _now@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sub	w9, w23, w9
	cmp	w9, w8
	csel	w23, w9, w8, lt
LBB0_3:
	tbz	w23, #31, LBB0_5
	b	LBB0_14
LBB0_4:
	mov	x23, x8
	tbnz	w23, #31, LBB0_14
LBB0_5:
Lloh8:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_get_utime
	add	w28, w23, w0
Lloh11:
	adrp	x27, _verbosity@GOTPAGE
Lloh12:
	ldr	x27, [x27, _verbosity@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	stp	x20, x28, [sp, #24]
	stp	x22, x19, [sp, #8]
	str	x24, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_7:
Lloh18:
	adrp	x8, _MAX_VALUE_LEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_VALUE_LEN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_14
; %bb.8:
	mov	x0, x24
	mov	x1, x22
	bl	_get_hash
	mov	x26, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x26
	bl	_get_entry
	mov	x23, x0
	mov	w0, #0
	bl	_ADD_OPER
	cmn	w23, #1
	b.eq	LBB0_13
; %bb.9:
Lloh21:
	adrp	x8, _mct_add@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mct_add@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w25
	b.eq	LBB0_14
; %bb.10:
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.11:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	str	x23, [sp]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_12:
	mov	x0, x23
	bl	_get_entry_ptr
	mov	x25, x0
	ldr	x0, [x0, #40]
	ldr	w8, [x25]
	add	w1, w8, #1
	bl	_zzfree
	mov	x0, x23
	bl	_del_entry_used
	mov	x0, x23
	bl	_del_entry_time
	b	LBB0_19
LBB0_13:
Lloh29:
	adrp	x8, _mct_replace@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mct_replace@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, w25
	b.ne	LBB0_16
LBB0_14:
	mov	w0, #-2
LBB0_15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_16:
Lloh32:
	adrp	x8, _total_items@GOTPAGE
Lloh33:
	ldr	x8, [x8, _total_items@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	bl	_get_new_entry
	mov	x23, x0
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_18
; %bb.17:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	mov	x8, x23
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_18:
	mov	x0, x23
	bl	_get_entry_ptr
	mov	x25, x0
	add	w0, w22, #1
	bl	_zzmalloc
	mov	x27, x0
	mov	x1, x24
	mov	x2, x22
	bl	_memcpy
	strb	wzr, [x27, w22, sxtw]
	str	x27, [x25, #8]
	str	w22, [x25, #16]
	str	x26, [x25, #24]
	mov	x0, x23
	bl	_add_entry
LBB0_19:
	add	w0, w19, #1
	bl	_zzmalloc
	mov	x1, x0
	str	x0, [x25, #40]
	mov	x0, x21
	mov	x2, x19
	bl	_read_in
	cmp	w0, w19
	cset	w0, eq
	bl	_assert
	ldr	x8, [x25, #40]
	str	xzr, [x8, w19, sxtw #3]
	str	w19, [x25]
	stp	w20, w28, [x25, #32]
	mov	x0, x23
	bl	_add_entry_used
	mov	x0, x23
	bl	_add_entry_time
	mov	w0, #1
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_cmd_set,4,2                    ; @cmd_set
	.comm	_SEC_IN_MONTH,4,2               ; @SEC_IN_MONTH
	.comm	_now,8,3                        ; @now
	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memcache_store: key='%s', key_len=%d, value_len=%d, flags = %d, exp_time = %d\n"

	.comm	_MAX_VALUE_LEN,4,2              ; @MAX_VALUE_LEN
	.comm	_mct_add,4,2                    ; @mct_add
l_.str.1:                               ; @.str.1
	.asciz	"found old entry x = %d\n"

	.comm	_mct_replace,4,2                ; @mct_replace
	.comm	_total_items,4,2                ; @total_items
l_.str.2:                               ; @.str.2
	.asciz	"created new entry x = %d\n"

	.comm	_stats_now,8,3                  ; @stats_now
.subsections_via_symbols
