	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NFTL_formatblock               ## -- Begin function NFTL_formatblock
	.p2align	4, 0x90
_NFTL_formatblock:                      ## @NFTL_formatblock
	.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, %r15d
	movq	%rdi, %rbx
	leaq	16(%rdi), %r12
	movq	8(%rdi), %r14
	movslq	(%rdi), %rax
	movslq	%esi, %r13
	imulq	%r13, %rax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rax), %rsi
	addq	$8, %rsi
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_nftl_read_oob
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-52(%rbp), %edi
	orl	-56(%rbp), %edi
	callq	_le16_to_cpu
	movq	_ERASE_MARK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpl	%edi, %eax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movq	_ERASE_MARK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_3:
	callq	_cpu_to_le16
	movl	%eax, -56(%rbp)
	movq	_ERASE_MARK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, -52(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movl	%eax, -48(%rbp)
LBB0_4:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	8(%rbx), %rax
	movq	%rax, 32(%rbx)
	movl	(%rbx), %eax
	movl	%eax, %ecx
	imull	%r15d, %ecx
	movl	%ecx, 16(%rbx)
	movl	%eax, 20(%rbx)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	*8(%r14)
	movq	24(%rbx), %rax
	movq	_MTD_ERASE_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_printk
	jmp	LBB0_8
LBB0_6:
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, %r15
	movl	(%rbx), %edx
	movl	16(%rbx), %esi
	movl	$1, %r12d
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_check_free_sectors
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	incl	%r15d
	cmovel	%r12d, %r15d
	movl	%r15d, %edi
	callq	_le32_to_cpu
	movl	%eax, -48(%rbp)
	movslq	(%rbx), %rax
	imulq	%r13, %rax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rax), %rsi
	addq	$8, %rsi
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_nftl_write_oob
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_9
LBB0_8:
	movq	8(%rbx), %rdi
	movl	16(%rbx), %esi
	callq	*(%rdi)
	movl	$-1, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SECTORSIZE,8,3                 ## @SECTORSIZE
	.comm	_ERASE_MARK,4,2                 ## @ERASE_MARK
	.comm	_MTD_ERASE_FAILED,8,3           ## @MTD_ERASE_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error while formatting block %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NFTL_formatblock               ; -- Begin function NFTL_formatblock
	.p2align	2
_NFTL_formatblock:                      ; @NFTL_formatblock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	add	x22, x0, #16
	ldr	x20, [x0, #8]
	ldrsw	x8, [x0]
	mov	x9, x1
	sxtw	x9, w9
Lloh0:
	adrp	x23, _SECTORSIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SECTORSIZE@GOTPAGEOFF]
	ldr	x10, [x23]
	madd	x8, x8, x9, x10
	add	x1, x8, #8
	add	x3, sp, #24
	add	x4, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	_nftl_read_oob
Lloh2:
	adrp	x24, _ERASE_MARK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ERASE_MARK@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldp	w8, w9, [sp, #8]
	orr	w0, w9, w8
	bl	_le16_to_cpu
	mov	x8, x0
	ldr	w0, [x24]
	cmp	w8, w0
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	w0, [x24]
LBB0_3:
	bl	_cpu_to_le16
	str	w0, [sp, #8]
	ldr	w0, [x24]
	bl	_cpu_to_le16
	str	w0, [sp, #12]
	mov	w0, #0
	bl	_cpu_to_le32
	str	w0, [sp, #16]
LBB0_4:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x19, #8]
	str	x8, [x19, #32]
	ldr	w8, [x19]
	mul	w9, w8, w21
	stp	w9, w8, [x19, #16]
	ldr	x8, [x20, #8]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	ldr	x8, [x19, #24]
Lloh4:
	adrp	x9, _MTD_ERASE_FAILED@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MTD_ERASE_FAILED@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_printk
	b	LBB0_7
LBB0_6:
	ldr	w0, [sp, #16]
	bl	_le32_to_cpu
	mov	x22, x0
	ldr	w1, [x19, #16]
	ldr	w2, [x19]
	mov	x0, x19
	mov	w3, #1
	bl	_check_free_sectors
	cbz	x0, LBB0_9
LBB0_7:
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	w1, [x19, #16]
	blr	x8
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	adds	w8, w22, #1
	csinc	w0, w8, wzr, lo
	bl	_le32_to_cpu
	str	w0, [sp, #16]
	ldrsw	x8, [x19]
	sxtw	x9, w21
	ldr	x10, [x23]
	madd	x8, x8, x9, x10
	add	x1, x8, #8
	add	x3, sp, #24
	add	x4, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	_nftl_write_oob
	tbnz	x0, #63, LBB0_7
; %bb.10:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SECTORSIZE,8,3                 ; @SECTORSIZE
	.comm	_ERASE_MARK,4,2                 ; @ERASE_MARK
	.comm	_MTD_ERASE_FAILED,8,3           ; @MTD_ERASE_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error while formatting block %d\n"

.subsections_via_symbols
