	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmz_lookup_secondary_sb
_dmz_lookup_secondary_sb:               ## @dmz_lookup_secondary_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	%rdi, %r13
	movq	16(%rdi), %rax
	movl	(%rax), %r12d
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_dmz_alloc_mblock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	8(%r13), %rax
	movq	%r14, 24(%rax)
	movq	(%r14), %rcx
	movq	%rcx, 40(%rax)
	movq	8(%rax), %rcx
	addq	%r12, %rcx
	movq	%rcx, 32(%rax)
	cmpl	$2, (%r13)
	jl	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	movq	_DMZ_MAGIC@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_dmz_read_sb
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movq	40(%rax), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	cmpq	(%r15), %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	addq	%r12, 32(%rax)
	incl	%ebx
	movl	(%r13), %eax
	decl	%eax
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_8:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_dmz_free_mblock
	movq	8(%r13), %rax
	movq	$0, 24(%rax)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMZ_MAGIC,8,3                  ## @DMZ_MAGIC
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dmz_lookup_secondary_sb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmz_lookup_secondary_sb
_dmz_lookup_secondary_sb:               ; @dmz_lookup_secondary_sb
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w21, [x8]
	mov	w1, #0
	bl	_dmz_alloc_mblock
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x10, [x0]
	ldr	x9, [x8, #8]
	add	x9, x9, x21
	str	x0, [x8, #24]
	stp	x9, x10, [x8, #32]
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.2:
	mov	w22, #0
Lloh0:
	adrp	x23, _DMZ_MAGIC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DMZ_MAGIC@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_dmz_read_sb
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #40]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #32]
	add	x9, x9, x21
	str	x9, [x8, #32]
	add	w22, w22, #1
	ldr	w8, [x19]
	sub	w8, w8, #1
	cmp	w22, w8
	b.lt	LBB0_3
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_dmz_free_mblock
	ldr	x8, [x19, #8]
	str	xzr, [x8, #24]
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMZ_MAGIC,8,3                  ; @DMZ_MAGIC
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dmz_lookup_secondary_sb
.subsections_via_symbols
