	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cache_do_set_yellow_light_remaining ## -- Begin function cache_do_set_yellow_light_remaining
	.p2align	4, 0x90
_cache_do_set_yellow_light_remaining:   ## @cache_do_set_yellow_light_remaining
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	movl	%r15d, %r8d
	callq	_vkprintf
	movl	$-1, %r12d
	testl	%r15d, %r15d
	js	LBB0_12
## %bb.1:
	movq	_MAX_YELLOW_LIGHT_DURATION@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jl	LBB0_12
## %bb.2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_get_uri_f
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	%rax, %rbx
	movq	_LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_CACHE_MAX_LOCAL_COPIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %r8
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_cache_local_copy_unpack
	movl	$-1, %r12d
	testl	%eax, %eax
	jle	LBB0_12
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax,%rbx), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$12, %rbx
	cmpq	%rbx, %r14
	jne	LBB0_5
	jmp	LBB0_12
LBB0_7:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_cache_get_unique_md5_bytes
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_assert
	movq	_LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CACHE_LOCAL_COPY_FLAG_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax,%rbx)
	je	LBB0_10
## %bb.8:
	cmpl	$8, %r12d
	jne	LBB0_10
## %bb.9:
	movq	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$8, %esi
	movl	%r15d, %edx
	callq	_alloc_log_event
	movq	_LC@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	4(%rcx,%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rax), %edi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_10:
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	$256, %eax                      ## imm = 0x100
	setl	%dil
	callq	_assert
	movq	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG@GOTPCREL(%rip), %rax
	movslq	%r12d, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rdi
	addq	%rcx, %rdi
	leal	8(%rcx), %esi
	movl	%r15d, %edx
	callq	_alloc_log_event
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_compute_get_uri_f_last_md5
	movl	4(%r12), %edi
	movq	_get_uri_f_last_md5@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	(%r12), %edi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	_LC@GOTPCREL(%rip), %r12
LBB0_11:
	addq	(%r12), %rbx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_cache_local_copy_set_yellow_light
	movq	(%r12), %rsi
	movl	-48(%rbp), %ecx
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_cache_uri_update_local_copy
	xorl	%r12d, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cache_do_set_local_copy_yellow_light_remaining (\"%s\", \"%s\", %d)\n"

	.comm	_MAX_YELLOW_LIGHT_DURATION,4,2  ## @MAX_YELLOW_LIGHT_DURATION
	.comm	_LC,8,3                         ## @LC
	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ## @CACHE_MAX_LOCAL_COPIES
	.comm	_CACHE_LOCAL_COPY_FLAG_INT,4,2  ## @CACHE_LOCAL_COPY_FLAG_INT
	.comm	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT,8,3 ## @LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT
	.comm	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG,8,3 ## @LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG
	.comm	_get_uri_f_last_md5,8,3         ## @get_uri_f_last_md5
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cache_do_set_yellow_light_remaining ; -- Begin function cache_do_set_yellow_light_remaining
	.p2align	2
_cache_do_set_yellow_light_remaining:   ; @cache_do_set_yellow_light_remaining
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	mov	x2, x20
	mov	x3, x21
	mov	x4, x19
	bl	_vkprintf
	mov	w0, #-1
	tbnz	w19, #31, LBB0_12
; %bb.1:
Lloh2:
	adrp	x8, _MAX_YELLOW_LIGHT_DURATION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_YELLOW_LIGHT_DURATION@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w19
	b.lt	LBB0_12
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_get_uri_f
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
Lloh5:
	adrp	x25, _LC@GOTPAGE
Lloh6:
	ldr	x25, [x25, _LC@GOTPAGEOFF]
	ldr	x1, [x25]
Lloh7:
	adrp	x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	w3, #1
	bl	_cache_local_copy_unpack
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x22, x0
	mov	x26, #0
	mov	w8, #12
	umull	x23, w0, w8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x8, x8, x26
	ldr	w0, [x8, #8]
	mov	x1, x21
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #12
	cmp	x23, x26
	b.ne	LBB0_5
LBB0_7:
	mov	w0, #-1
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	bl	_cache_get_unique_md5_bytes
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x25]
	ldr	w8, [x8, x26]
Lloh10:
	adrp	x9, _CACHE_LOCAL_COPY_FLAG_INT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CACHE_LOCAL_COPY_FLAG_INT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	w23, #8, #0, ne
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x21
	bl	_strlen
	mov	x23, x0
	cmp	w0, #256
	cset	w0, lt
	bl	_assert
Lloh13:
	adrp	x8, _LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	add	x0, x8, w23, sxtw
	add	w1, w23, #8
	mov	x2, x19
	bl	_alloc_log_event
	mov	x24, x0
	mov	x0, x20
	bl	_compute_get_uri_f_last_md5
	ldr	w0, [x24, #4]
Lloh16:
	adrp	x8, _get_uri_f_last_md5@GOTPAGE
Lloh17:
	ldr	x8, [x8, _get_uri_f_last_md5@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	mov	w2, #16
	bl	_memcpy
	ldr	w0, [x24]
	mov	x1, x21
	mov	x2, x23
	b	LBB0_11
LBB0_10:
Lloh19:
	adrp	x8, _LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	mov	w1, #8
	mov	x2, x19
	bl	_alloc_log_event
	ldr	x8, [x25]
	add	x8, x8, x26
	ldr	w8, [x8, #4]
	str	w8, [x0, #4]
	ldr	w0, [x0]
	mov	x1, x20
	mov	w2, #8
LBB0_11:
	bl	_memcpy
	ldr	x8, [x25]
	add	x0, x8, x26
	mov	x1, x19
	bl	_cache_local_copy_set_yellow_light
	ldr	x1, [x25]
	ldr	w3, [sp, #12]
	mov	x0, x20
	mov	x2, x22
	bl	_cache_uri_update_local_copy
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cache_do_set_local_copy_yellow_light_remaining (\"%s\", \"%s\", %d)\n"

	.comm	_MAX_YELLOW_LIGHT_DURATION,4,2  ; @MAX_YELLOW_LIGHT_DURATION
	.comm	_LC,8,3                         ; @LC
	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ; @CACHE_MAX_LOCAL_COPIES
	.comm	_CACHE_LOCAL_COPY_FLAG_INT,4,2  ; @CACHE_LOCAL_COPY_FLAG_INT
	.comm	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT,8,3 ; @LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_SHORT
	.comm	_LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG,8,3 ; @LEV_CACHE_SET_LOCAL_COPY_YELLOW_LIGHT_LONG
	.comm	_get_uri_f_last_md5,8,3         ; @get_uri_f_last_md5
.subsections_via_symbols
