	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function erase_sector
_erase_sector:                          ## @erase_sector
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	cmpq	$0, 24(%rdi)
	je	LBB0_6
## %bb.1:
	movl	8(%r12), %edx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.2:
	movq	16(%r12), %rax
	movl	4(%r12), %ecx
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpl	%edx, %ebx
	jge	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rsi
	addq	%rbx, %rsi
	cmpq	$0, (%rax,%rsi,8)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %esi
	addq	%rbx, %rsi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_NS_DBG
	movq	16(%r12), %rax
	movslq	4(%r12), %rcx
	movq	%rcx, %rdx
	addq	%rbx, %rdx
	movq	$0, (%rax,%rdx,8)
	movl	8(%r12), %edx
	jmp	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_NS_GET_PAGE
	movq	%rax, %r14
	movl	8(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpl	%eax, %ebx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14,%rbx,8)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r12), %esi
	addl	%ebx, %esi
	movq	%r15, %rdi
	callq	_NS_DBG
	movl	(%r12), %edi
	movq	(%r14,%rbx,8), %rsi
	callq	_kmem_cache_free
	movq	$0, (%r14,%rbx,8)
	movl	8(%r12), %eax
	jmp	LBB0_10
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"erase_sector: freeing page %d\n"

	.no_dead_strip	_erase_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function erase_sector
_erase_sector:                          ; @erase_sector
	.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, #24]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.2:
	mov	x21, #0
	ldr	x8, [x19, #16]
	ldr	w10, [x19, #4]
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	cmp	w21, w9
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x21, w10, sxtw
	ldr	x11, [x8, x11, lsl #3]
	cbz	x11, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, x21, w10, uxtw
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_NS_DBG
	ldr	x8, [x19, #16]
	ldp	w10, w9, [x19, #4]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	add	x11, x21, x10
	str	xzr, [x8, x11, lsl #3]
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_NS_GET_PAGE
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x20, x0
	mov	x22, #0
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	cmp	w22, w8
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, x22, lsl #3]
	cbz	x9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x19, #4]
	add	w1, w22, w8
	mov	x0, x21
	bl	_NS_DBG
	ldr	w0, [x19]
	lsl	x23, x22, #3
	ldr	x1, [x20, x23]
	bl	_kmem_cache_free
	str	xzr, [x20, x23]
	ldr	w8, [x19, #8]
	b	LBB0_8
LBB0_11:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"erase_sector: freeing page %d\n"

	.no_dead_strip	_erase_sector
.subsections_via_symbols
