	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cache_do_set_new_local_copy    ## -- Begin function cache_do_set_new_local_copy
	.p2align	4, 0x90
_cache_do_set_new_local_copy:           ## @cache_do_set_new_local_copy
	.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
	movq	%rsi, %r13
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_vkprintf
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_get_uri_f
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_LC@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	$0, 8(%rax)
	movl	4(%rax), %edi
	movq	%r13, %rsi
	callq	_strcpy
	movq	(%r14), %rdi
	leaq	-48(%rbp), %rsi
	callq	_cache_local_copy_compute_packed_location
	cmpl	$0, -48(%rbp)
	je	LBB0_3
## %bb.4:
	movq	(%r14), %rsi
	movq	_CACHE_MAX_LOCAL_COPIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %r8
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_cache_local_copy_unpack
	movl	$-1, %ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	js	LBB0_15
## %bb.5:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_LC@GOTPCREL(%rip), %rbx
	je	LBB0_10
## %bb.6:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	shlq	$4, %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	4(%rax,%r14), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	addq	$16, %r14
	cmpq	%r14, %r15
	jne	LBB0_8
LBB0_10:
	movq	(%rbx), %r14
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movslq	%eax, %r15
	incl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	shlq	$4, %r15
	leaq	(%r14,%r15), %rbx
	movq	%rbx, %rdi
	callq	_cache_local_copy_init
	movq	%r13, %rdi
	callq	_strlen
	xorl	%edi, %edi
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	$256, %eax                      ## imm = 0x100
	setl	%dil
	callq	_assert
	movl	4(%r14,%r15), %edi
	movq	%r13, %rsi
	callq	_strcpy
	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	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cache_local_copy_try_pack_location
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	cmpl	$8, %r12d
	jne	LBB0_13
## %bb.12:
	movq	_LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_alloc_log_event
	movl	(%rax), %edi
	movq	%r14, %rsi
	movl	$8, %edx
	jmp	LBB0_14
LBB0_1:
	movl	$-1, %ecx
	jmp	LBB0_15
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_vkprintf
	movl	$-1, %ecx
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_vkprintf
	movl	$-1, %ecx
	jmp	LBB0_15
LBB0_13:
	movq	_LEV_CACHE_SET_NEW_LOCAL_COPY_LONG@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rdi
	addq	(%rax), %rdi
	movl	%ebx, %esi
	addl	$8, %esi
	xorl	%edx, %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
	movl	%ebx, %edx
LBB0_14:
	callq	_memcpy
	movq	_LC@GOTPCREL(%rip), %rbx
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_cache_uri_incr_server_stats0
	movq	(%rbx), %rsi
	movl	-56(%rbp), %ecx
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_cache_uri_update_local_copy
	xorl	%ecx, %ecx
LBB0_15:
	movl	%ecx, %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_new_local_copy (%s, %s)\n"

	.comm	_LC,8,3                         ## @LC
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't compute ${node_id},${server_id},${disk_id} for local uri: %s\n"

	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ## @CACHE_MAX_LOCAL_COPIES
L_.str.2:                               ## @.str.2
	.asciz	"cache_do_set_new_local_copy (global_uri: %s, local_uri: %s): ignore duplicate set.\n"

	.comm	_LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT,8,3 ## @LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT
	.comm	_LEV_CACHE_SET_NEW_LOCAL_COPY_LONG,8,3 ## @LEV_CACHE_SET_NEW_LOCAL_COPY_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_new_local_copy    ; -- Begin function cache_do_set_new_local_copy
	.p2align	2
_cache_do_set_new_local_copy:           ; @cache_do_set_new_local_copy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x21, x0
	str	x1, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	mov	x2, x21
	bl	_vkprintf
	mov	x0, x21
	mov	w1, #0
	bl	_get_uri_f
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x25, _LC@GOTPAGE
Lloh3:
	ldr	x25, [x25, _LC@GOTPAGEOFF]
	ldr	x8, [x25]
	str	xzr, [x8, #8]
	ldr	w0, [x8, #4]
	mov	x1, x20
	bl	_strcpy
	ldr	x0, [x25]
	add	x1, sp, #24
	bl	_cache_local_copy_compute_packed_location
	ldr	w8, [sp, #24]
	cbz	w8, LBB0_10
; %bb.2:
	ldr	x1, [x25]
Lloh4:
	adrp	x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x4, sp, #20
	mov	x0, x19
	mov	w3, #1
	bl	_cache_local_copy_unpack
	tbnz	w0, #31, LBB0_9
; %bb.3:
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.4:
	mov	x23, #0
	mov	w8, w22
	lsl	x24, x8, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x8, x8, x23
	ldr	w0, [x8, #4]
	mov	x1, x20
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #16
	cmp	x24, x23
	b.ne	LBB0_5
LBB0_7:
	ldr	x8, [x25]
	add	w21, w22, #1
	add	x23, x8, w22, sxtw #4
	mov	x0, x23
	bl	_cache_local_copy_init
	mov	x0, x20
	bl	_strlen
	mov	x22, x0
	cmp	w0, #256
	cset	w0, lt
	bl	_assert
	ldr	w0, [x23, #4]
	mov	x1, x20
	bl	_strcpy
	mov	x0, x19
	bl	_cache_get_unique_md5_bytes
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	mov	x1, x23
	bl	_cache_local_copy_try_pack_location
	cmp	w0, #0
	ccmp	w24, #8, #0, eq
	b.eq	LBB0_13
; %bb.8:
Lloh7:
	adrp	x8, _LEV_CACHE_SET_NEW_LOCAL_COPY_LONG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LEV_CACHE_SET_NEW_LOCAL_COPY_LONG@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x0, x8, w22, sxtw
	add	w1, w22, #8
	mov	w2, #0
	bl	_alloc_log_event
	mov	x23, x0
	mov	x0, x19
	bl	_compute_get_uri_f_last_md5
	ldr	w0, [x23, #4]
Lloh10:
	adrp	x8, _get_uri_f_last_md5@GOTPAGE
Lloh11:
	ldr	x8, [x8, _get_uri_f_last_md5@GOTPAGEOFF]
Lloh12:
	ldr	x1, [x8]
	mov	w2, #16
	bl	_memcpy
	ldr	w0, [x23]
	mov	x1, x20
	mov	x2, x22
	b	LBB0_14
LBB0_9:
	mov	w0, #-1
	b	LBB0_15
LBB0_10:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	b	LBB0_12
LBB0_11:
	str	x20, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	mov	x2, x21
LBB0_12:
	bl	_vkprintf
	mov	w0, #-1
	b	LBB0_15
LBB0_13:
Lloh17:
	adrp	x8, _LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT@GOTPAGEOFF]
Lloh19:
	ldr	x0, [x8]
	ldr	w2, [x23]
	mov	w1, #4
	bl	_alloc_log_event
	ldr	w0, [x0]
	mov	x1, x19
	mov	w2, #8
LBB0_14:
	bl	_memcpy
	ldr	w1, [sp, #24]
	mov	x0, x19
	bl	_cache_uri_incr_server_stats0
	ldr	x1, [x25]
	ldr	w3, [sp, #20]
	mov	x0, x19
	mov	x2, x21
	bl	_cache_uri_update_local_copy
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cache_do_set_new_local_copy (%s, %s)\n"

	.comm	_LC,8,3                         ; @LC
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't compute ${node_id},${server_id},${disk_id} for local uri: %s\n"

	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ; @CACHE_MAX_LOCAL_COPIES
l_.str.2:                               ; @.str.2
	.asciz	"cache_do_set_new_local_copy (global_uri: %s, local_uri: %s): ignore duplicate set.\n"

	.comm	_LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT,8,3 ; @LEV_CACHE_SET_NEW_LOCAL_COPY_SHORT
	.comm	_LEV_CACHE_SET_NEW_LOCAL_COPY_LONG,8,3 ; @LEV_CACHE_SET_NEW_LOCAL_COPY_LONG
	.comm	_get_uri_f_last_md5,8,3         ; @get_uri_f_last_md5
.subsections_via_symbols
