	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rfd_ftl_writesect
_rfd_ftl_writesect:                     ## @rfd_ftl_writesect
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	cmpl	$-1, (%r14)
	je	LBB0_1
## %bb.3:
	cmpq	%r15, 8(%r14)
	jbe	LBB0_4
## %bb.5:
	movq	16(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	%rax, -48(%rbp)
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r12,%rbx)
	jne	LBB0_7
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_6
	jmp	LBB0_10
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_do_writesect
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movl	(%r13), %eax
LBB0_9:
	cmpl	%eax, %ebx
	jne	LBB0_11
LBB0_10:
	movq	16(%r14), %rax
	movq	$-1, (%rax,%r15,8)
LBB0_11:
	movq	-48(%rbp), %rsi
	cmpq	$-1, %rsi
	je	LBB0_12
## %bb.13:
	movq	%r14, %rdi
	callq	_mark_sector_deleted
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rfd_ftl_writesect(sector=0x%lx)\n"

	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SECTOR_SIZE,4,2                ## @SECTOR_SIZE
	.no_dead_strip	_rfd_ftl_writesect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rfd_ftl_writesect
_rfd_ftl_writesect:                     ; @rfd_ftl_writesect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.ls	LBB0_7
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x20, lsl #3]
	str	x8, [sp, #8]
Lloh2:
	adrp	x23, _SECTOR_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SECTOR_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x21, x22]
	cbnz	w9, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x8, x22
	b.ne	LBB0_4
	b	LBB0_11
LBB0_6:
Lloh4:
	adrp	x8, _EACCES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	mov	w22, #0
	cmp	w22, w8
	b.ne	LBB0_12
LBB0_11:
	ldr	x8, [x19, #16]
	mov	x9, #-1
	str	x9, [x8, x20, lsl #3]
LBB0_12:
	ldr	x1, [sp, #8]
	cmn	x1, #1
	b.eq	LBB0_16
; %bb.13:
	mov	x0, x19
	bl	_mark_sector_deleted
	b	LBB0_9
LBB0_14:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_do_writesect
	cbnz	w0, LBB0_9
; %bb.15:
	ldr	w8, [x23]
	cmp	w22, w8
	b.eq	LBB0_11
	b	LBB0_12
LBB0_16:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rfd_ftl_writesect(sector=0x%lx)\n"

	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SECTOR_SIZE,4,2                ; @SECTOR_SIZE
	.no_dead_strip	_rfd_ftl_writesect
.subsections_via_symbols
