	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdblock_release
_mtdblock_release:                      ## @mtdblock_release
	.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
	movslq	(%rdi), %r12
	movq	_mtdblks@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax,%r12,8), %r14
	movq	_MTD_DEBUG_LEVEL1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DEBUG
	movq	_mtdblks_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	leaq	20(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_write_cached_data
	movq	%rbx, %rdi
	callq	_mutex_unlock
	decl	16(%r14)
	jne	LBB0_4
## %bb.1:
	movq	(%r13), %rax
	movq	$0, (%rax,%r12,8)
	movq	8(%r14), %rdi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	callq	*%rax
LBB0_3:
	movl	(%r14), %edi
	callq	_vfree
	movq	%r14, %rdi
	callq	_kfree
LBB0_4:
	movq	_mtdblks_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_DEBUG
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtdblks,8,3                    ## @mtdblks
	.comm	_MTD_DEBUG_LEVEL1,4,2           ## @MTD_DEBUG_LEVEL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtdblock_release\n"

	.comm	_mtdblks_lock,4,2               ## @mtdblks_lock
L_.str.1:                               ## @.str.1
	.asciz	"ok\n"

	.no_dead_strip	_mtdblock_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdblock_release
_mtdblock_release:                      ; @mtdblock_release
	.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
	ldrsw	x22, [x0]
Lloh0:
	adrp	x23, _mtdblks@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mtdblks@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x19, [x8, x22, lsl #3]
Lloh2:
	adrp	x21, _MTD_DEBUG_LEVEL1@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MTD_DEBUG_LEVEL1@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DEBUG
Lloh6:
	adrp	x0, _mtdblks_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _mtdblks_lock@GOTPAGEOFF]
	bl	_mutex_lock
	add	x20, x19, #20
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_write_cached_data
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w8, [x19, #16]
	subs	w8, w8, #1
	str	w8, [x19, #16]
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x23]
	str	xzr, [x8, x22, lsl #3]
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
	blr	x8
LBB0_3:
	ldr	w0, [x19]
	bl	_vfree
	mov	x0, x19
	bl	_kfree
LBB0_4:
Lloh8:
	adrp	x0, _mtdblks_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _mtdblks_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DEBUG
	mov	w0, #0
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_mtdblks,8,3                    ; @mtdblks
	.comm	_MTD_DEBUG_LEVEL1,4,2           ; @MTD_DEBUG_LEVEL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtdblock_release\n"

	.comm	_mtdblks_lock,4,2               ; @mtdblks_lock
l_.str.1:                               ; @.str.1
	.asciz	"ok\n"

	.no_dead_strip	_mtdblock_release
.subsections_via_symbols
