	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmz_check_sb
_dmz_check_sb:                          ## @dmz_check_sb
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	40(%rdi), %r14
	movl	64(%rsi), %edi
	callq	_le64_to_cpu
	movl	%eax, %ebx
	movq	56(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movq	$0, 56(%r13)
	movq	_DMZ_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_crc32_le
	cmpq	%r12, %rax
	jne	LBB0_1
## %bb.2:
	movq	48(%r13), %rdi
	callq	_le32_to_cpu
	movq	_DMZ_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	%ebx, %eax
	jne	LBB0_3
## %bb.7:
	movq	40(%r13), %rdi
	callq	_le32_to_cpu
	movq	_DMZ_META_VER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	%ebx, %eax
	jne	LBB0_8
## %bb.9:
	movq	32(%r13), %rdi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %ecx
	leal	(%rax,%rcx), %ebx
	decl	%ebx
	movb	4(%r14), %cl
	shrl	%cl, %ebx
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.10:
	cmpl	(%r15), %ebx
	jae	LBB0_11
## %bb.13:
	movq	24(%r13), %rdi
	callq	_le32_to_cpu
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	24(%r13), %rdi
	callq	_le32_to_cpu
	movl	4(%r15), %r12d
	movl	%r12d, %ecx
	subl	%ebx, %ecx
	cmpl	%ecx, %eax
	jae	LBB0_15
## %bb.16:
	movq	24(%r13), %rdi
	callq	_le32_to_cpu
	subl	%ebx, %r12d
	subl	%ebx, %r12d
	subl	%eax, %r12d
	movq	16(%r13), %rdi
	callq	_le32_to_cpu
	cmpl	%r12d, %eax
	jbe	LBB0_18
## %bb.17:
	movq	16(%r13), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	%r12d, %ecx
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movq	%rax, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_dmz_dev_err
	jmp	LBB0_6
LBB0_3:
	movq	48(%r13), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_8:
	movq	40(%r13), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
LBB0_5:
	xorl	%eax, %eax
	callq	_dmz_dev_err
	jmp	LBB0_6
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
LBB0_12:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dmz_dev_err
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	32(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, 8(%r15)
	movq	24(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, 12(%r15)
	movq	16(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, 16(%r15)
	movq	8(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, 20(%r15)
	movq	(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, 24(%r15)
	movl	%ebx, 28(%r15)
	movl	%r12d, 32(%r15)
	xorl	%r15d, %r15d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_DMZ_BLOCK_SIZE,4,2             ## @DMZ_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid checksum (needed 0x%08x, got 0x%08x)"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_DMZ_MAGIC,4,2                  ## @DMZ_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"Invalid meta magic (needed 0x%08x, got 0x%08x)"

	.comm	_DMZ_META_VER,4,2               ## @DMZ_META_VER
L_.str.2:                               ## @.str.2
	.asciz	"Invalid meta version (needed %d, got %d)"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid number of metadata blocks"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid number of reserved sequential zones"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid number of chunks %u / %u"

	.no_dead_strip	_dmz_check_sb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmz_check_sb
_dmz_check_sb:                          ; @dmz_check_sb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #40]
	ldr	w0, [x1, #64]
	bl	_le64_to_cpu
	mov	x22, x0
	ldr	x0, [x21, #56]
	bl	_le32_to_cpu
	mov	w23, w0
	str	xzr, [x21, #56]
Lloh0:
	adrp	x8, _DMZ_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMZ_BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x21
	bl	_crc32_le
	cmp	x0, x23
	b.ne	LBB0_9
; %bb.1:
	ldr	x0, [x21, #48]
	bl	_le32_to_cpu
Lloh3:
	adrp	x8, _DMZ_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMZ_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	cmp	w0, w22
	b.ne	LBB0_10
; %bb.2:
	ldr	x0, [x21, #40]
	bl	_le32_to_cpu
Lloh6:
	adrp	x8, _DMZ_META_VER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMZ_META_VER@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	cmp	w0, w22
	b.ne	LBB0_11
; %bb.3:
	ldr	x0, [x21, #32]
	bl	_le32_to_cpu
	ldp	w8, w9, [x19]
	add	w8, w0, w8
	sub	w8, w8, #1
	lsr	w22, w8, w9
	cbz	w22, LBB0_12
; %bb.4:
	ldr	w8, [x20]
	cmp	w22, w8
	b.hs	LBB0_12
; %bb.5:
	ldr	x0, [x21, #24]
	bl	_le32_to_cpu
	cbz	w0, LBB0_13
; %bb.6:
	ldr	x0, [x21, #24]
	bl	_le32_to_cpu
	ldr	w23, [x20, #4]
	sub	w8, w23, w22
	cmp	w0, w8
	b.hs	LBB0_13
; %bb.7:
	ldr	x0, [x21, #24]
	bl	_le32_to_cpu
	sub	w8, w23, w22, lsl #1
	sub	w23, w8, w0
	ldr	x0, [x21, #16]
	bl	_le32_to_cpu
	cmp	w0, w23
	b.ls	LBB0_16
; %bb.8:
	ldr	x0, [x21, #16]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x23, [sp]
Lloh9:
	adrp	x1, l_.str.5@PAGE
Lloh10:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_9:
	stp	x0, x23, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
	ldr	x0, [x21, #48]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_11:
	ldr	x0, [x21, #40]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_dmz_dev_err
Lloh21:
	adrp	x8, _ENXIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	add	sp, sp, #80
	ret
LBB0_16:
	ldr	x0, [x21, #32]
	bl	_le32_to_cpu
	str	w0, [x20, #8]
	ldr	x0, [x21, #24]
	bl	_le32_to_cpu
	str	w0, [x20, #12]
	ldr	x0, [x21, #16]
	bl	_le32_to_cpu
	str	w0, [x20, #16]
	ldr	x0, [x21, #8]
	bl	_le32_to_cpu
	str	w0, [x20, #20]
	ldr	x0, [x21]
	bl	_le32_to_cpu
	mov	x8, x0
	mov	w0, #0
	stp	w8, w22, [x20, #24]
	str	w23, [x20, #32]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DMZ_BLOCK_SIZE,4,2             ; @DMZ_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid checksum (needed 0x%08x, got 0x%08x)"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_DMZ_MAGIC,4,2                  ; @DMZ_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"Invalid meta magic (needed 0x%08x, got 0x%08x)"

	.comm	_DMZ_META_VER,4,2               ; @DMZ_META_VER
l_.str.2:                               ; @.str.2
	.asciz	"Invalid meta version (needed %d, got %d)"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid number of metadata blocks"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid number of reserved sequential zones"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid number of chunks %u / %u"

	.no_dead_strip	_dmz_check_sb
.subsections_via_symbols
