	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RestoreBlockImage              ## -- Begin function RestoreBlockImage
	.p2align	4, 0x90
_RestoreBlockImage:                     ## @RestoreBlockImage
	.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	8(%rdi), %r14
	leaq	(%rsi,%rsi,2), %r15
	shlq	$4, %r15
	xorl	%r12d, %r12d
	cmpl	$0, 40(%r14,%r15)
	je	LBB0_9
## %bb.1:
	cmpl	$0, 36(%r14,%r15)
	je	LBB0_9
## %bb.2:
	movq	%rdx, %rcx
	movq	(%r14,%r15), %r8
	movq	_BKPIMAGE_IS_COMPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14,%r15)
	je	LBB0_5
## %bb.3:
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	32(%r14,%r15), %esi
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rcx
	subq	16(%r14,%r15), %rcx
	movq	%r8, %rdi
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	$1, %r8d
	callq	_pglz_decompress
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	js	LBB0_4
LBB0_5:
	cmpq	$0, 16(%r14,%r15)
	je	LBB0_6
## %bb.7:
	leaq	(%r14,%r15), %r12
	addq	$16, %r12
	movq	24(%r14,%r15), %rdx
	movq	%rcx, %rdi
	movq	%r8, %rsi
	movq	%rcx, %rbx
	movq	%r8, %r13
	callq	_memcpy
	movq	24(%r14,%r15), %rdi
	addq	%rbx, %rdi
	movq	(%r12), %rdx
	xorl	%esi, %esi
	callq	_MemSet
	movq	24(%r14,%r15), %rax
	movq	(%r12), %rcx
	addq	%rax, %rcx
	addq	%rcx, %rbx
	addq	%rax, %r13
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	subq	%rcx, %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	jmp	LBB0_8
LBB0_6:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rcx, %rdi
	movq	%r8, %rsi
LBB0_8:
	callq	_memcpy
	movl	$1, %r12d
	jmp	LBB0_9
LBB0_4:
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r13, %r8
	callq	_report_invalid_record
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BKPIMAGE_IS_COMPRESSED,4,2     ## @BKPIMAGE_IS_COMPRESSED
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid compressed image at %X/%X, block %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RestoreBlockImage              ; -- Begin function RestoreBlockImage
	.p2align	2
_RestoreBlockImage:                     ; @RestoreBlockImage
	.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
	ldr	x24, [x0, #8]
	mov	w8, #48
	madd	x8, x1, x8, x24
	ldr	w8, [x8, #40]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x21, x1
	mov	w8, #48
	madd	x8, x1, x8, x24
	ldr	w8, [x8, #36]
	cbz	w8, LBB0_9
; %bb.2:
	mov	x19, x2
	mov	w8, #48
	madd	x8, x21, x8, x24
	ldr	x20, [x8]
	ldr	w8, [x8, #8]
Lloh0:
	adrp	x9, _BKPIMAGE_IS_COMPRESSED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BKPIMAGE_IS_COMPRESSED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x23, _BLCKSZ@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BLCKSZ@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x22, x0
	mov	w8, #48
	madd	x8, x21, x8, x24
	ldr	w1, [x8, #32]
	ldr	x9, [x23]
	ldr	x8, [x8, #16]
	sub	x3, x9, x8
	mov	x0, x20
	mov	w4, #1
	bl	_pglz_decompress
	tbnz	x0, #63, LBB0_8
LBB0_4:
	mov	w8, #48
	madd	x22, x21, x8, x24
	ldr	x8, [x22, #16]!
	cbz	x8, LBB0_6
; %bb.5:
	mov	w8, #48
	madd	x21, x21, x8, x24
	ldr	x2, [x21, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_memcpy
	ldr	x8, [x21, #24]
	add	x0, x19, x8
	ldr	x2, [x22]
	mov	w1, #0
	bl	_MemSet
	ldr	x8, [x21, #24]
	ldr	x9, [x22]
	add	x9, x9, x8
	add	x0, x19, x9
	add	x1, x20, x8
	ldr	x8, [x23]
	sub	x2, x8, x9
	b	LBB0_7
LBB0_6:
	ldr	x2, [x23]
	mov	x0, x19
	mov	x1, x20
LBB0_7:
	bl	_memcpy
	mov	w0, #1
	b	LBB0_10
LBB0_8:
	ldr	w3, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x4, x21
	bl	_report_invalid_record
LBB0_9:
	mov	w0, #0
LBB0_10:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_BKPIMAGE_IS_COMPRESSED,4,2     ; @BKPIMAGE_IS_COMPRESSED
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid compressed image at %X/%X, block %d"

.subsections_via_symbols
