	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmz_load_sb
_dmz_load_sb:                           ## @dmz_load_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	32(%rdi), %esi
	callq	_dmz_start_block
	movq	24(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_dmz_get_sb
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	16(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dmz_dev_err
	jmp	LBB0_20
LBB0_2:
	movq	24(%r15), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_dmz_check_sb
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_dmz_lookup_secondary_sb
	jmp	LBB0_5
LBB0_3:
	movq	24(%r15), %rax
	movl	(%r15), %edx
	movq	16(%r15), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movslq	%edx, %rcx
	addq	8(%rax), %rcx
	movq	%rcx, 24(%rax)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_dmz_get_sb
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	16(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dmz_dev_err
	jmp	LBB0_20
LBB0_7:
	movq	24(%r15), %rax
	movq	16(%rax), %rsi
	movq	%r15, %rdi
	callq	_dmz_check_sb
	movl	%eax, %ebx
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.8:
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.9:
	movq	16(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_11:
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.13:
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_dmz_recover_mblocks
	movl	%eax, %r12d
	testl	%ebx, %ebx
	je	LBB0_15
LBB0_16:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_dmz_recover_mblocks
	movl	%eax, %r12d
	xorl	%eax, %eax
	testl	%r12d, %r12d
	je	LBB0_19
LBB0_18:
	movq	16(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	callq	_dmz_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_12:
	movq	24(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_le64_to_cpu
	movq	%rax, %r14
	movl	%ebx, %r12d
	testl	%ebx, %ebx
	jne	LBB0_16
LBB0_15:
	movq	24(%r15), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edi
	callq	_le64_to_cpu
	testl	%r12d, %r12d
	jne	LBB0_18
LBB0_19:
	xorl	%edx, %edx
	cmpq	%rax, %r14
	cmovgq	%r14, %rax
	setl	%dl
	movq	%rax, 8(%r15)
	movl	%edx, 4(%r15)
	movq	16(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	movq	%rax, %rcx
	callq	_dmz_dev_debug
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read primary super block failed"

L_.str.1:                               ## @.str.1
	.asciz	"Read secondary super block failed"

L_.str.2:                               ## @.str.2
	.asciz	"No valid super block found"

	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"Recovery failed"

L_.str.4:                               ## @.str.4
	.asciz	"Using super block %u (gen %llu)"

	.no_dead_strip	_dmz_load_sb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmz_load_sb
_dmz_load_sb:                           ; @dmz_load_sb
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	w1, [x0, #32]
	bl	_dmz_start_block
	ldr	x8, [x19, #24]
	str	x0, [x8, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_dmz_get_sb
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dmz_dev_err
	b	LBB0_13
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_dmz_check_sb
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_dmz_lookup_secondary_sb
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_4:
	ldr	x0, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dmz_dev_err
	b	LBB0_13
LBB0_5:
	ldp	x9, x8, [x19, #16]
	ldr	x10, [x8, #8]
	ldr	w11, [x19]
	ldr	w9, [x9]
	lsl	w9, w11, w9
	add	x9, x10, w9, sxtw
	str	x9, [x8, #24]
	mov	x0, x19
	mov	w1, #1
	bl	_dmz_get_sb
	mov	x21, x0
	cbnz	w0, LBB0_4
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	x1, [x8, #16]
	mov	x0, x19
	bl	_dmz_check_sb
	cmp	w20, #0
	ccmp	w0, #0, #4, ne
	b.ne	LBB0_11
; %bb.7:
	mov	x21, x0
	cbz	w20, LBB0_14
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	bl	_dmz_recover_mblocks
	mov	x22, x0
	mov	x20, #0
	cbz	w21, LBB0_15
LBB0_9:
	mov	x0, x19
	mov	w1, #1
	bl	_dmz_recover_mblocks
	mov	x22, x0
	mov	x0, #0
	cbz	w22, LBB0_16
LBB0_10:
	ldr	x0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_11:
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	bl	_dmz_dev_err
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_le64_to_cpu
	mov	x20, x0
	mov	x22, x21
	cbnz	w21, LBB0_9
LBB0_15:
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	bl	_le64_to_cpu
	cbnz	w22, LBB0_10
LBB0_16:
	cmp	x20, x0
	csel	x3, x20, x0, gt
	cset	w2, lt
	str	x3, [x19, #8]
	str	w2, [x19, #4]
	ldr	x0, [x19, #16]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dmz_dev_debug
	mov	w21, #0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read primary super block failed"

l_.str.1:                               ; @.str.1
	.asciz	"Read secondary super block failed"

l_.str.2:                               ; @.str.2
	.asciz	"No valid super block found"

	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"Recovery failed"

l_.str.4:                               ; @.str.4
	.asciz	"Using super block %u (gen %llu)"

	.no_dead_strip	_dmz_load_sb
.subsections_via_symbols
