	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_header
_read_header:                           ## @read_header
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	jne	LBB0_2
## %bb.1:
	movq	_DM_CHUNK_SIZE_DEFAULT_SECTORS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	12(%rax), %edi
	callq	_dm_snap_cow
	movl	(%rax), %edi
	callq	_bdev_logical_block_size
	sarl	$9, %eax
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_max
                                        ## kill: def $eax killed $eax def $rax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	leal	-1(%rax), %edx
	movl	%edx, 4(%rcx)
	movl	%eax, %edi
	callq	___ffs
	movq	(%rbx), %rcx
	movl	%eax, 8(%rcx)
LBB0_2:
	xorl	%eax, %eax
	callq	_dm_io_client_create
	movl	%eax, 32(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.17:
	movl	32(%rbx), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	callq	_alloc_area
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.4:
	movq	24(%rbx), %rsi
	movq	_REQ_OP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_chunk_io
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	movq	%rbx, %rdi
	callq	_free_area
LBB0_16:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	24(%rbx), %r15
	movl	12(%r15), %edi
	callq	_le32_to_cpu
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	12(%r15), %edi
	callq	_le32_to_cpu
	movq	_SNAP_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DMWARN
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_6:
	movl	$1, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_16
LBB0_10:
	movl	$0, (%r14)
	movl	8(%r15), %edi
	callq	_le32_to_cpu
	movq	%rax, 16(%rbx)
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	movq	%rax, 8(%rbx)
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movq	%rax, %r14
	movq	(%rbx), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	cmpl	%r14d, %edx
	je	LBB0_16
## %bb.11:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DMWARN
LBB0_13:
	movq	%rbx, %rdi
	callq	_free_area
	movq	(%rbx), %rdi
	leaq	-40(%rbp), %rdx
	movl	%r14d, %esi
	callq	_dm_exception_store_set_chunk_size
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r15d
	movq	-40(%rbp), %rdx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	callq	_DMERR
	jmp	LBB0_16
LBB0_15:
	movq	%rbx, %rdi
	callq	_alloc_area
	movl	%eax, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_DM_CHUNK_SIZE_DEFAULT_SECTORS,4,2 ## @DM_CHUNK_SIZE_DEFAULT_SECTORS
	.comm	_REQ_OP_READ,4,2                ## @REQ_OP_READ
	.comm	_SNAP_MAGIC,8,3                 ## @SNAP_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid or corrupt snapshot"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"chunk size %u in device metadata overrides table chunk size of %u."

L_.str.2:                               ## @.str.2
	.asciz	"invalid on-disk chunk size %u: %s."

	.no_dead_strip	_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_header
_read_header:                           ; @read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w22, [x8]
	cbnz	w22, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _DM_CHUNK_SIZE_DEFAULT_SECTORS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DM_CHUNK_SIZE_DEFAULT_SECTORS@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x9]
	ldr	w0, [x8, #12]
	bl	_dm_snap_cow
	ldr	w0, [x0]
	bl	_bdev_logical_block_size
	asr	w1, w0, #9
	mov	x0, x21
	bl	_max
	ldr	x8, [x19]
	sub	w9, w0, #1
	stp	w0, w9, [x8]
	bl	___ffs
	ldr	x8, [x19]
	str	w0, [x8, #8]
LBB0_2:
	bl	_dm_io_client_create
	str	w0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #32]
	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
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_4:
	mov	x0, x19
	bl	_alloc_area
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	x1, [x19, #24]
Lloh3:
	adrp	x8, _REQ_OP_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REQ_OP_READ@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w4, #0
	mov	w5, #1
	bl	_chunk_io
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_free_area
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	x21, [x19, #24]
	ldr	w0, [x21, #12]
	bl	_le32_to_cpu
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w0, [x21, #12]
	bl	_le32_to_cpu
Lloh6:
	adrp	x8, _SNAP_MAGIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNAP_MAGIC@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.10:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMWARN
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_11:
	mov	w21, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_7
LBB0_12:
	str	wzr, [x20]
	ldr	w0, [x21, #8]
	bl	_le32_to_cpu
	str	x0, [x19, #16]
	ldr	w0, [x21, #4]
	bl	_le32_to_cpu
	str	x0, [x19, #8]
	ldr	w0, [x21]
	bl	_le32_to_cpu
	mov	x20, x0
	mov	w21, #0
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.13:
	cbz	w22, LBB0_15
; %bb.14:
	mov	x9, x20
	stp	x9, x8, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMWARN
LBB0_15:
	mov	x0, x19
	bl	_free_area
	ldr	x0, [x19]
	add	x2, sp, #24
	mov	x1, x20
	bl	_dm_exception_store_set_chunk_size
	cbz	w0, LBB0_17
; %bb.16:
	mov	x21, x0
	ldr	x2, [sp, #24]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_DMERR
	b	LBB0_7
LBB0_17:
	mov	x0, x19
	bl	_alloc_area
	mov	x21, x0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DM_CHUNK_SIZE_DEFAULT_SECTORS,4,2 ; @DM_CHUNK_SIZE_DEFAULT_SECTORS
	.comm	_REQ_OP_READ,4,2                ; @REQ_OP_READ
	.comm	_SNAP_MAGIC,8,3                 ; @SNAP_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid or corrupt snapshot"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"chunk size %u in device metadata overrides table chunk size of %u."

l_.str.2:                               ; @.str.2
	.asciz	"invalid on-disk chunk size %u: %s."

	.no_dead_strip	_read_header
.subsections_via_symbols
