	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_bmpcache2
_process_bmpcache2:                     ## @process_bmpcache2
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movl	%edi, %r13d
	movq	_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%esi, %r12d
	movq	_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	andl	%esi, %r14d
	movq	_PERSIST@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_in_uint8p
LBB0_2:
	movq	_SQUARE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r15d, %ebx
	movl	%r13d, %edi
	callq	_in_uint8
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movl	%r13d, %edi
	callq	_in_uint8
LBB0_4:
	movl	%r13d, %edi
	callq	_in_uint16_be
	movl	%r13d, %edi
	callq	_in_uint8
	movl	%r13d, %edi
	xorl	%edx, %edx
	callq	_in_uint8p
	xorl	%edi, %edi
	callq	_DEBUG
	xorl	%edi, %edi
	callq	_xmalloc
	movq	%rax, %r13
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.5:
	addl	$-2, %r12d
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	movl	%r12d, %r9d
	callq	_bitmap_decompress
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	%r13, %rdx
	callq	_ui_create_bitmap
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_cache_put_bitmap
	movq	_PERSIST@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.9:
	movq	%r13, (%rsp)
	movl	%r14d, %edi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_pstcache_save_bitmap
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_11:
	callq	_DEBUG
LBB0_12:
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ID_MASK,4,2                    ## @ID_MASK
	.comm	_MODE_MASK,4,2                  ## @MODE_MASK
	.comm	_MODE_SHIFT,4,2                 ## @MODE_SHIFT
	.comm	_PERSIST,4,2                    ## @PERSIST
	.comm	_SQUARE,4,2                     ## @SQUARE
	.comm	_BUFSIZE_MASK,4,2               ## @BUFSIZE_MASK
	.comm	_LONG_FORMAT,4,2                ## @LONG_FORMAT
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Failed to decompress bitmap data\n"

L_.str.2:                               ## @.str.2
	.asciz	"process_bmpcache2: ui_create_bitmap failed\n"

	.no_dead_strip	_process_bmpcache2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_bmpcache2
_process_bmpcache2:                     ; @process_bmpcache2
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ID_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ID_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _MODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_MASK@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MODE_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MODE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
Lloh8:
	ldr	w24, [x9]
Lloh9:
	adrp	x22, _PERSIST@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PERSIST@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #8
	bl	_in_uint8p
LBB0_2:
Lloh11:
	adrp	x8, _SQUARE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SQUARE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w26, w8, w19
	mov	x0, x20
	bl	_in_uint8
	cbnz	w26, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_in_uint8
LBB0_4:
	mov	x0, x20
	bl	_in_uint16_be
	mov	x0, x20
	bl	_in_uint8
	mov	x0, x20
	mov	w2, #0
	bl	_in_uint8p
	mov	x0, #0
	bl	_DEBUG
	mov	w0, #0
	bl	_xmalloc
	mov	x20, x0
	cbz	x21, LBB0_6
; %bb.5:
	and	w8, w25, w19
	asr	w8, w8, w24
	sub	w5, w8, #2
	mov	x0, x20
	mov	w4, #0
	bl	_bitmap_decompress
	cbz	w0, LBB0_10
LBB0_6:
	mov	x2, x20
	bl	_ui_create_bitmap
	cbz	x0, LBB0_9
; %bb.7:
	mov	x2, x0
	and	w21, w23, w19
	mov	x0, x21
	bl	_cache_put_bitmap
	ldr	w8, [x22]
	tst	w8, w19
	b.eq	LBB0_12
; %bb.8:
	mov	x0, x21
	mov	x2, #0
	mov	w5, #0
	mov	x6, x20
	bl	_pstcache_save_bitmap
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_DEBUG
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_xfree
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ID_MASK,4,2                    ; @ID_MASK
	.comm	_MODE_MASK,4,2                  ; @MODE_MASK
	.comm	_MODE_SHIFT,4,2                 ; @MODE_SHIFT
	.comm	_PERSIST,4,2                    ; @PERSIST
	.comm	_SQUARE,4,2                     ; @SQUARE
	.comm	_BUFSIZE_MASK,4,2               ; @BUFSIZE_MASK
	.comm	_LONG_FORMAT,4,2                ; @LONG_FORMAT
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Failed to decompress bitmap data\n"

l_.str.2:                               ; @.str.2
	.asciz	"process_bmpcache2: ui_create_bitmap failed\n"

	.no_dead_strip	_process_bmpcache2
.subsections_via_symbols
