	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_bmpcache
_process_bmpcache:                      ## @process_bmpcache
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	callq	_in_uint8
	movl	%ebx, %edi
	callq	_in_uint8
	movl	%ebx, %edi
	callq	_in_uint8
	movl	%ebx, %edi
	callq	_in_uint8
	movl	%ebx, %edi
	callq	_in_uint8
	movl	%ebx, %edi
	callq	_in_uint16_le
	movl	%ebx, %edi
	callq	_in_uint16_le
	movq	_g_rdp_version@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_RDP_V5@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_in_uint16_le
	movl	%ebx, %edi
	callq	_in_uint16_le
	movl	%ebx, %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_in_uint16_le
	movl	%ebx, %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_in_uint16_le
LBB0_2:
	movl	%ebx, %edi
	callq	_in_uint8p
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_DEBUG
	xorl	%edi, %edi
	callq	_xmalloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%r9d, %r9d
	callq	_bitmap_decompress
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdx
	callq	_ui_create_bitmap
	movl	%eax, %edx
	callq	_cache_put_bitmap
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DEBUG
LBB0_5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_xfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_rdp_version,8,3              ## @g_rdp_version
	.comm	_RDP_V5,8,3                     ## @RDP_V5
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Failed to decompress bitmap data\n"

	.no_dead_strip	_process_bmpcache
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_bmpcache
_process_bmpcache:                      ; @process_bmpcache
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_in_uint8
	mov	x0, x19
	bl	_in_uint8
	mov	x0, x19
	bl	_in_uint8
	mov	x0, x19
	bl	_in_uint8
	mov	x0, x19
	bl	_in_uint8
	mov	x0, x19
	bl	_in_uint16_le
	mov	x0, x19
	bl	_in_uint16_le
Lloh0:
	adrp	x8, _g_rdp_version@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_rdp_version@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _RDP_V5@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RDP_V5@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #65535
	bl	_in_uint16_le
	mov	x0, x19
	bl	_in_uint16_le
	mov	x0, x19
	mov	w1, #65535
	bl	_in_uint16_le
	mov	x0, x19
	mov	w1, #65535
	bl	_in_uint16_le
LBB0_2:
	mov	x0, x19
	bl	_in_uint8p
	mov	w0, #65535
	bl	_DEBUG
	mov	w0, #0
	bl	_xmalloc
	mov	x19, x0
	mov	w5, #0
	bl	_bitmap_decompress
	cbz	x0, LBB0_4
; %bb.3:
	mov	x2, x19
	bl	_ui_create_bitmap
	mov	x2, x0
	bl	_cache_put_bitmap
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DEBUG
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_xfree
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_g_rdp_version,8,3              ; @g_rdp_version
	.comm	_RDP_V5,8,3                     ; @RDP_V5
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Failed to decompress bitmap data\n"

	.no_dead_strip	_process_bmpcache
.subsections_via_symbols
