	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_and_mark_free_block
_check_and_mark_free_block:             ## @check_and_mark_free_block
	.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, %r12d
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %eax
	imull	%esi, %eax
	movq	_SECTORSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rax), %esi
	addl	$8, %esi
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_nftl_read_oob
	movl	$-1, %r15d
	testq	%rax, %rax
	js	LBB0_5
## %bb.1:
	movl	-52(%rbp), %edi
	orl	-56(%rbp), %edi
	callq	_le16_to_cpu
	movq	_ERASE_MARK@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_2
LBB0_4:
	xorl	%r15d, %r15d
	jmp	LBB0_5
LBB0_2:
	movl	(%rbx), %edx
	movl	%edx, %esi
	imull	%r12d, %esi
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_check_free_sectors
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movl	(%r13), %edi
	callq	_cpu_to_le16
	movl	%eax, -56(%rbp)
	movl	(%r13), %edi
	callq	_cpu_to_le16
	movl	%eax, -52(%rbp)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movl	%eax, -48(%rbp)
	imull	(%rbx), %r12d
	movq	_SECTORSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%r12), %esi
	addl	$8, %esi
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_nftl_write_oob
	testq	%rax, %rax
	jns	LBB0_4
LBB0_5:
	movl	%r15d, %eax
	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	_ERASE_MARK,4,2                 ## @ERASE_MARK
	.comm	_buf,8,3                        ## @buf
	.comm	_i,4,2                          ## @i
	.no_dead_strip	_check_and_mark_free_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_and_mark_free_block
_check_and_mark_free_block:             ; @check_and_mark_free_block
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _SECTORSIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SECTORSIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	madd	w8, w8, w1, w9
	add	w1, w8, #8
	add	x3, sp, #8
	add	x4, sp, #16
	mov	x0, x19
	mov	w2, #8
	bl	_nftl_read_oob
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldp	w8, w9, [sp, #16]
	orr	w0, w9, w8
	bl	_le16_to_cpu
Lloh2:
	adrp	x23, _ERASE_MARK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ERASE_MARK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	ldr	w2, [x21]
	mul	w1, w2, w20
	mov	x0, x21
	mov	w3, #1
	bl	_check_free_sectors
	cbz	x0, LBB0_6
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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_6:
	ldr	w0, [x23]
	bl	_cpu_to_le16
	str	w0, [sp, #16]
	ldr	w0, [x23]
	bl	_cpu_to_le16
	str	w0, [sp, #20]
	mov	w0, #0
	bl	_cpu_to_le32
	str	w0, [sp, #24]
	ldr	w8, [x21]
	ldr	w9, [x22]
	madd	w8, w8, w20, w9
	add	w1, w8, #8
	add	x3, sp, #8
	add	x4, sp, #16
	mov	x0, x19
	mov	w2, #8
	bl	_nftl_write_oob
	tbz	x0, #63, LBB0_2
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SECTORSIZE,4,2                 ; @SECTORSIZE
	.comm	_ERASE_MARK,4,2                 ; @ERASE_MARK
	.comm	_buf,8,3                        ; @buf
	.comm	_i,4,2                          ; @i
	.no_dead_strip	_check_and_mark_free_block
.subsections_via_symbols
