	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_sectors_in_chain
_check_sectors_in_chain:                ## @check_sectors_in_chain
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	24(%rdi), %r14
	movl	(%rdi), %eax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	divl	%ecx
	cmpl	$2, %eax
	movl	$1, %r12d
	cmovael	%eax, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	jbe	LBB0_2
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %ebx
	movq	_BLOCK_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	16(%r15), %ebx
	jb	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printk
	movq	_BLOCK_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%eax, %ebx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	16(%r15), %ebx
	jb	LBB0_1
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_printk
	movq	_SECTOR_IGNORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%eax, -44(%rbp)
	movl	(%r15), %eax
	imull	%ebx, %eax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	%r13d, %esi
	addl	%eax, %esi
	movq	%r14, %rdi
	movl	$8, %edx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_nftl_write_oob
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=2
	incl	%r13d
	cmpl	%r12d, %r13d
	je	LBB0_11
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	imull	%ebx, %eax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	%r13d, %esi
	addl	%eax, %esi
	movq	%r14, %rdi
	movl	$8, %edx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_nftl_read_oob
	testq	%rax, %rax
	jns	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_SECTOR_IGNORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	jne	LBB0_10
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	-44(%rbp), %eax
	orl	-48(%rbp), %eax
	cmpl	$128, %eax
	jne	LBB0_10
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	leaq	-48(%rbp), %rdi
	movl	$255, %esi
	movl	$8, %edx
	callq	_memcmpb
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r15), %eax
	imull	%ebx, %eax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %esi
	imull	%r13d, %esi
	addl	%eax, %esi
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_check_free_sectors
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_10
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SECTORSIZE,4,2                 ## @SECTORSIZE
	.comm	_SECTOR_IGNORE,8,3              ## @SECTOR_IGNORE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect free sector %d in block %d: marking it as ignored\n"

	.comm	_BLOCK_NIL,4,2                  ## @BLOCK_NIL
L_.str.1:                               ## @.str.1
	.asciz	"incorrect ReplUnitTable[] : %d\n"

	.no_dead_strip	_check_sectors_in_chain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_sectors_in_chain
_check_sectors_in_chain:                ; @check_sectors_in_chain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #24]
	ldr	w25, [x0]
Lloh0:
	adrp	x26, _SECTORSIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SECTORSIZE@GOTPAGEOFF]
	ldr	w27, [x26]
	udiv	w8, w25, w27
	cmp	w8, #1
	csinc	w28, w8, wzr, hi
Lloh2:
	adrp	x22, _SECTOR_IGNORE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SECTOR_IGNORE@GOTPAGEOFF]
Lloh4:
	adrp	x23, l_.str@PAGE
Lloh5:
	add	x23, x23, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cmp	w27, w25
	b.ls	LBB0_7
LBB0_2:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20, #8]
	ldr	w19, [x8, w19, uxtw #2]
Lloh6:
	adrp	x8, _BLOCK_NIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLOCK_NIL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w19, w8
	b.eq	LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x20, #16]
	cmp	w19, w9
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printk
Lloh11:
	adrp	x8, _BLOCK_NIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BLOCK_NIL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w19, w8
	b.eq	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20, #16]
	cmp	w19, w8
	b.lo	LBB0_1
	b	LBB0_13
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w24, #0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	str	x19, [sp]
	mov	x0, x23
	mov	x1, x24
	bl	_printk
	ldr	w8, [x22]
	stp	w8, w8, [sp, #24]
	ldr	w8, [x20]
	mul	w8, w8, w19
	ldr	w9, [x26]
	madd	w1, w9, w24, w8
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x0, x21
	mov	w2, #8
	bl	_nftl_write_oob
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w24, w24, #1
	cmp	w24, w28
	b.eq	LBB0_2
LBB0_10:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x20]
	mul	w8, w8, w19
	ldr	w9, [x26]
	madd	w1, w9, w24, w8
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x0, x21
	mov	w2, #8
	bl	_nftl_read_oob
	ldr	w8, [x22]
	ldp	w9, w10, [sp, #24]
	orr	w9, w10, w9
	cmp	x0, #0
	csel	w8, w8, w9, lt
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x0, sp, #24
	mov	w1, #255
	mov	w2, #8
	bl	_memcmpb
	cbnz	w0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x20]
	mul	w8, w8, w19
	ldr	w2, [x26]
	madd	w1, w2, w24, w8
	mov	x0, x20
	mov	w3, #0
	bl	_check_free_sectors
	cbnz	w0, LBB0_8
	b	LBB0_9
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SECTORSIZE,4,2                 ; @SECTORSIZE
	.comm	_SECTOR_IGNORE,8,3              ; @SECTOR_IGNORE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect free sector %d in block %d: marking it as ignored\n"

	.comm	_BLOCK_NIL,4,2                  ; @BLOCK_NIL
l_.str.1:                               ; @.str.1
	.asciz	"incorrect ReplUnitTable[] : %d\n"

	.no_dead_strip	_check_sectors_in_chain
.subsections_via_symbols
