	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cache_convert
_cache_convert:                         ## @cache_convert
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_CACHE_MAX_LOCAL_COPIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_cache_local_copy_unpack
	testl	%eax, %eax
	js	LBB0_14
## %bb.1:
	je	LBB0_18
## %bb.2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, %r15d
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	_LC@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r12d
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	%r15, %r13
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(,%r13,8), %rdi
	addq	(%rbx), %rdi
	leaq	-72(%rbp), %rsi
	callq	_cache_local_copy_get_flags
	movl	%eax, %r14d
	movl	$4, %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	cmpl	$1, %r14d
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %eax
	cmpq	%rax, %r13
	movq	_LC@GOTPCREL(%rip), %rbx
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	movslq	%r12d, %rcx
	movq	(%rax,%r13,8), %rdx
	movq	%rdx, (%rax,%rcx,8)
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_LC@GOTPCREL(%rip), %rbx
	jmp	LBB0_4
LBB0_9:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.10:
	xorl	%eax, %eax
	callq	_lrand48
	cltd
	idivl	%r12d
	movq	(%rbx), %rax
	movslq	%edx, %r12
	movq	_CACHE_LOCAL_COPY_FLAG_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax,%r12,8)
	je	LBB0_12
## %bb.11:
	leaq	(%rax,%r12,8), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_cache_local_copy_unpack_location
	movq	(%rbx), %rax
LBB0_12:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	4(%rax,%r12,8), %edi
	callq	_strlen
	cmpl	%r14d, %eax
	jge	LBB0_16
## %bb.13:
	movq	_LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%r12,8), %esi
	movq	%r15, %rdi
	callq	_strcpy
	movl	$1, %ebx
	jmp	LBB0_18
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	jmp	LBB0_17
LBB0_15:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_vkprintf
LBB0_17:
	movl	$-1, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LC,8,3                         ## @LC
	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ## @CACHE_MAX_LOCAL_COPIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cache_convert: cache_local_copy_unpack failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"cache_local_copy_get_flags returns %d.\n"

	.comm	_CACHE_LOCAL_COPY_FLAG_INT,4,2  ## @CACHE_LOCAL_COPY_FLAG_INT
L_.str.2:                               ## @.str.2
	.asciz	"cache_convert: output buffer is too small (%d bytes).\n"

	.no_dead_strip	_cache_convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cache_convert
_cache_convert:                         ; @cache_convert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _LC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LC@GOTPAGEOFF]
	ldr	x1, [x24]
Lloh2:
	adrp	x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CACHE_MAX_LOCAL_COPIES@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w3, #0
	mov	x4, #0
	bl	_cache_local_copy_unpack
	tbnz	w0, #31, LBB0_13
; %bb.1:
	cbz	w0, LBB0_17
; %bb.2:
	mov	x26, #0
	mov	w25, #0
	mov	w27, w0
Lloh5:
	adrp	x22, l_.str.1@PAGE
Lloh6:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w25, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #1
	cmp	x26, x27
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x0, x8, x26, lsl #3
	add	x1, sp, #8
	bl	_cache_local_copy_get_flags
	mov	x23, x0
	str	x23, [sp]
	mov	w0, #4
	mov	x1, x22
	bl	_vkprintf
	cmp	w23, #1
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x26, w25, uxtw
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24]
	ldr	x9, [x8, x26, lsl #3]
	str	x9, [x8, w25, sxtw #3]
	b	LBB0_3
LBB0_8:
	cbz	w25, LBB0_14
; %bb.9:
	bl	_lrand48
	sdiv	w8, w0, w25
	msub	w9, w8, w25, w0
	ldr	x8, [x24]
	sxtw	x22, w9
	add	x1, x8, w9, sxtw #3
	ldr	w9, [x1]
Lloh7:
	adrp	x10, _CACHE_LOCAL_COPY_FLAG_INT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _CACHE_LOCAL_COPY_FLAG_INT@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_cache_local_copy_unpack_location
	ldr	x8, [x24]
LBB0_11:
	add	x8, x8, x22, lsl #3
	ldr	w0, [x8, #4]
	bl	_strlen
	cmp	w0, w20
	b.ge	LBB0_15
; %bb.12:
	ldr	x8, [x24]
	add	x8, x8, x22, lsl #3
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_strcpy
	mov	w0, #1
	b	LBB0_17
LBB0_13:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_14:
	mov	w0, #0
	b	LBB0_17
LBB0_15:
	str	x20, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	mov	w0, #1
	bl	_vkprintf
	mov	w0, #-1
LBB0_17:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LC,8,3                         ; @LC
	.comm	_CACHE_MAX_LOCAL_COPIES,4,2     ; @CACHE_MAX_LOCAL_COPIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cache_convert: cache_local_copy_unpack failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"cache_local_copy_get_flags returns %d.\n"

	.comm	_CACHE_LOCAL_COPY_FLAG_INT,4,2  ; @CACHE_LOCAL_COPY_FLAG_INT
l_.str.2:                               ; @.str.2
	.asciz	"cache_convert: output buffer is too small (%d bytes).\n"

	.no_dead_strip	_cache_convert
.subsections_via_symbols
