	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CacheInternalAddBlockToCache   ## -- Begin function CacheInternalAddBlockToCache
	.p2align	4, 0x90
_CacheInternalAddBlockToCache:          ## @CacheInternalAddBlockToCache
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	%r14, %rdi
	callq	_CacheInternalCheckCacheSizeLimits
	movq	_TAG_CACHE_BLOCK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$4, %edi
	callq	_FrLdrTempAlloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_RtlZeroMemory
	movl	%r15d, (%rbx)
	movl	4(%r14), %edi
	imull	(%r14), %edi
	movq	_TAG_CACHE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FrLdrTempAlloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%r14), %edx
	movl	12(%r14), %edi
	imull	%edx, %r15d
	movq	_DiskReadBuffer@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%r15d, %esi
	callq	_MachDiskReadLogicalSectors
	movq	8(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	(%r13), %esi
	movl	4(%r14), %edx
	imull	(%r14), %edx
	callq	_RtlCopyMemory
	leaq	8(%r14), %rdi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_InsertTailList
	movq	_CacheBlockCount@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	movl	%ecx, (%rax)
	imull	(%r14), %ecx
	imull	4(%r14), %ecx
	movq	_CacheSizeCurrent@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	%r14, %rdi
	callq	_CacheInternalDumpBlockList
	jmp	LBB0_8
LBB0_5:
	movq	_TAG_CACHE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FrLdrTempFree
LBB0_6:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_FrLdrTempFree
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %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	"CacheInternalAddBlockToCache() BlockNumber = %d\n"

	.comm	_TAG_CACHE_BLOCK,4,2            ## @TAG_CACHE_BLOCK
	.comm	_TAG_CACHE_DATA,4,2             ## @TAG_CACHE_DATA
	.comm	_DiskReadBuffer,4,2             ## @DiskReadBuffer
	.comm	_CacheBlockCount,4,2            ## @CacheBlockCount
	.comm	_CacheSizeCurrent,4,2           ## @CacheSizeCurrent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CacheInternalAddBlockToCache   ; -- Begin function CacheInternalAddBlockToCache
	.p2align	2
_CacheInternalAddBlockToCache:          ; @CacheInternalAddBlockToCache
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	mov	x0, x20
	bl	_CacheInternalCheckCacheSizeLimits
Lloh2:
	adrp	x22, _TAG_CACHE_BLOCK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TAG_CACHE_BLOCK@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #4
	bl	_FrLdrTempAlloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	w1, #4
	bl	_RtlZeroMemory
	str	w21, [x19]
	ldp	w8, w9, [x20]
	mul	w0, w9, w8
Lloh4:
	adrp	x23, _TAG_CACHE_DATA@GOTPAGE
Lloh5:
	ldr	x23, [x23, _TAG_CACHE_DATA@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_FrLdrTempAlloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x20, #12]
	ldr	w2, [x20]
	mul	w1, w2, w21
Lloh6:
	adrp	x21, _DiskReadBuffer@GOTPAGE
Lloh7:
	ldr	x21, [x21, _DiskReadBuffer@GOTPAGEOFF]
	ldr	w3, [x21]
	bl	_MachDiskReadLogicalSectors
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	w1, [x21]
	ldp	w8, w9, [x20]
	mul	w2, w9, w8
	bl	_RtlCopyMemory
	add	x0, x20, #8
	add	x1, x19, #4
	bl	_InsertTailList
Lloh8:
	adrp	x8, _CacheBlockCount@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CacheBlockCount@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldp	w8, w10, [x20]
	mul	w8, w8, w9
	mul	w8, w8, w10
Lloh10:
	adrp	x9, _CacheSizeCurrent@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CacheSizeCurrent@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	mov	x0, x20
	bl	_CacheInternalDumpBlockList
	b	LBB0_6
LBB0_4:
	ldr	w1, [x23]
	bl	_FrLdrTempFree
LBB0_5:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_FrLdrTempFree
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CacheInternalAddBlockToCache() BlockNumber = %d\n"

	.comm	_TAG_CACHE_BLOCK,4,2            ; @TAG_CACHE_BLOCK
	.comm	_TAG_CACHE_DATA,4,2             ; @TAG_CACHE_DATA
	.comm	_DiskReadBuffer,4,2             ; @DiskReadBuffer
	.comm	_CacheBlockCount,4,2            ; @CacheBlockCount
	.comm	_CacheSizeCurrent,4,2           ; @CacheSizeCurrent
.subsections_via_symbols
