	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pstcache_enumerate             ## -- Begin function pstcache_enumerate
	.p2align	4, 0x90
_pstcache_enumerate:                    ## @pstcache_enumerate
	.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
	movl	$30744, %eax                    ## imm = 0x7818
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_g_bitmap_cache@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.1:
	movq	_g_bitmap_cache_persist_enable@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_IS_PERSISTENT
	testq	%rax, %rax
	je	LBB0_20
## %bb.3:
	movq	_g_pstcache_enumerated@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_20
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_DEBUG_RDP5
	movq	_BMPCACHE2_NUM_PSTCELLS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.6:
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ecx, %ecx
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	shlq	$32, %rcx
	movq	%rcx, %rdx
	sarq	$30, %rdx
	movl	%r13d, -10288(%rbp,%rdx)
	sarq	$29, %rcx
	movq	%rax, -30768(%rbp,%rcx)
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_19
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	_g_pstcache_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %ebx
	movq	_MAX_CELL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_pstcache_Bpp@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	addl	$16, %esi
	imull	%r13d, %esi
	movl	%ebx, %edi
	callq	_rd_lseek_file
	movl	%ebx, %edi
	leaq	-30784(%rbp), %rsi
	movl	$16, %edx
	callq	_rd_read_file
	testq	%rax, %rax
	jle	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	-30776(%rbp), %edi
	movq	_zero_key@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r15,%r13,4), %edi
	movl	-30776(%rbp), %esi
	movl	$4, %edx
	callq	_memcpy
	movq	_g_bitmap_cache_precache@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, -30784(%rbp)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_g_server_depth@GOTPCREL(%rip), %rax
	cmpl	$9, (%rax)
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_pstcache_load_bitmap
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-30784(%rbp), %rax
	testq	%r13, %r13
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rcx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	-1(%rcx), %rdx
	movl	%edx, %esi
	movq	-30768(%rbp,%rsi,8), %rdi
	cmpq	%rdi, %rax
	jge	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	-10288(%rbp,%rsi,4), %esi
	movl	%esi, -10288(%rbp,%rcx,4)
	movq	%rdi, -30768(%rbp,%rcx,8)
	leaq	1(%rdx), %rsi
	movq	%rdx, %rcx
	cmpq	$1, %rsi
	jg	LBB0_15
	jmp	LBB0_17
LBB0_5:
	xorl	%r13d, %r13d
LBB0_19:
	movl	%r13d, %edi
	callq	_DEBUG_RDP5
	leaq	-10288(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_cache_rebuild_bmpcache_linked_list
	movq	_True@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_g_pstcache_enumerated@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%r13d, %eax
	addq	$30744, %rsp                    ## imm = 0x7818
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_g_bitmap_cache,8,3             ## @g_bitmap_cache
	.comm	_g_bitmap_cache_persist_enable,8,3 ## @g_bitmap_cache_persist_enable
	.comm	_g_pstcache_enumerated,8,3      ## @g_pstcache_enumerated
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Persistent bitmap cache enumeration... "

	.comm	_BMPCACHE2_NUM_PSTCELLS,4,2     ## @BMPCACHE2_NUM_PSTCELLS
	.comm	_g_pstcache_fd,8,3              ## @g_pstcache_fd
	.comm	_g_pstcache_Bpp,4,2             ## @g_pstcache_Bpp
	.comm	_MAX_CELL_SIZE,4,2              ## @MAX_CELL_SIZE
	.comm	_zero_key,4,2                   ## @zero_key
	.comm	_g_bitmap_cache_precache,8,3    ## @g_bitmap_cache_precache
	.comm	_g_server_depth,4,2             ## @g_server_depth
	.comm	_True,8,3                       ## @True
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pstcache_enumerate             ; -- Begin function pstcache_enumerate
	.p2align	2
_pstcache_enumerate:                    ; @pstcache_enumerate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w9, #30752
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #7, lsl #12             ; =28672
	sub	sp, sp, #2080
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh5:
	adrp	x8, _g_bitmap_cache@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_bitmap_cache@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _g_bitmap_cache_persist_enable@GOTPAGE
Lloh9:
	ldr	x9, [x9, _g_bitmap_cache_persist_enable@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_19
LBB0_2:
	mov	x21, x1
	mov	x19, x0
	bl	_IS_PERSISTENT
	mov	w20, #0
	cbz	x0, LBB0_19
; %bb.3:
Lloh11:
	adrp	x22, _g_pstcache_enumerated@GOTPAGE
Lloh12:
	ldr	x22, [x22, _g_pstcache_enumerated@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_19
; %bb.4:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DEBUG_RDP5
Lloh15:
	adrp	x24, _BMPCACHE2_NUM_PSTCELLS@GOTPAGE
Lloh16:
	ldr	x24, [x24, _BMPCACHE2_NUM_PSTCELLS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.5:
	mov	x20, #0
Lloh17:
	adrp	x27, _MAX_CELL_SIZE@GOTPAGE
Lloh18:
	ldr	x27, [x27, _MAX_CELL_SIZE@GOTPAGEOFF]
	orr	w28, wzr, #0x10
	add	x25, sp, #5, lsl #12            ; =20480
	add	x25, x25, #16
	add	x26, sp, #16
Lloh19:
	adrp	x23, _g_server_depth@GOTPAGE
Lloh20:
	ldr	x23, [x23, _g_server_depth@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x9, #0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	sbfiz	x10, x9, #2, #32
	str	w20, [x25, x10]
	sbfiz	x9, x9, #3, #32
	str	x8, [x26, x9]
	add	x20, x20, #1
	ldrsw	x8, [x24]
	cmp	x20, x8
	b.ge	LBB0_16
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
Lloh21:
	adrp	x8, _g_pstcache_fd@GOTPAGE
Lloh22:
	ldr	x8, [x8, _g_pstcache_fd@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	w22, [x8, x19, lsl #2]
Lloh24:
	adrp	x8, _g_pstcache_Bpp@GOTPAGE
Lloh25:
	ldr	x8, [x8, _g_pstcache_Bpp@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x27]
	madd	w8, w9, w8, w28
	mul	w1, w8, w20
	mov	x0, x22
	bl	_rd_lseek_file
	mov	x1, sp
	mov	x0, x22
	mov	w2, #16
	bl	_rd_read_file
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [sp, #8]
Lloh27:
	adrp	x8, _zero_key@GOTPAGE
Lloh28:
	ldr	x8, [x8, _zero_key@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x21, x20, lsl #2]
	ldr	w1, [sp, #8]
	mov	w2, #4
	bl	_memcpy
Lloh30:
	adrp	x8, _g_bitmap_cache_precache@GOTPAGE
Lloh31:
	ldr	x8, [x8, _g_bitmap_cache_precache@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	x9, [sp]
	ldr	w10, [x23]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	ccmp	w10, #9, #8, ne
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_pstcache_load_bitmap
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp]
	cbz	x20, LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x9, x20
LBB0_14:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	x10, x9, #1
	ldr	x11, [x26, w10, uxtw #3]
	cmp	x8, x11
	b.ge	LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	and	x12, x10, #0xffffffff
	ldr	w12, [x25, x12, lsl #2]
	str	w12, [x25, x9, lsl #2]
	str	x11, [x26, x9, lsl #3]
	add	x11, x10, #1
	mov	x9, x10
	cmp	x11, #1
	b.gt	LBB0_14
	b	LBB0_6
LBB0_16:
Lloh33:
	adrp	x22, _g_pstcache_enumerated@GOTPAGE
Lloh34:
	ldr	x22, [x22, _g_pstcache_enumerated@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
	mov	w20, #0
LBB0_18:
	mov	w0, w20
	bl	_DEBUG_RDP5
	add	x1, sp, #5, lsl #12             ; =20480
	add	x1, x1, #16
	mov	x0, x19
	mov	x2, x20
	bl	_cache_rebuild_bmpcache_linked_list
Lloh35:
	adrp	x8, _True@GOTPAGE
Lloh36:
	ldr	x8, [x8, _True@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	str	x8, [x22]
LBB0_19:
	ldur	x8, [x29, #-96]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x20
	add	sp, sp, #7, lsl #12             ; =28672
	add	sp, sp, #2080
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_g_bitmap_cache,8,3             ; @g_bitmap_cache
	.comm	_g_bitmap_cache_persist_enable,8,3 ; @g_bitmap_cache_persist_enable
	.comm	_g_pstcache_enumerated,8,3      ; @g_pstcache_enumerated
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Persistent bitmap cache enumeration... "

	.comm	_BMPCACHE2_NUM_PSTCELLS,4,2     ; @BMPCACHE2_NUM_PSTCELLS
	.comm	_g_pstcache_fd,8,3              ; @g_pstcache_fd
	.comm	_g_pstcache_Bpp,4,2             ; @g_pstcache_Bpp
	.comm	_MAX_CELL_SIZE,4,2              ; @MAX_CELL_SIZE
	.comm	_zero_key,4,2                   ; @zero_key
	.comm	_g_bitmap_cache_precache,8,3    ; @g_bitmap_cache_precache
	.comm	_g_server_depth,4,2             ; @g_server_depth
	.comm	_True,8,3                       ; @True
.subsections_via_symbols
