	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mspro_block_disk_release
_mspro_block_disk_release:              ## @mspro_block_disk_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	callq	_disk_devt
	movl	%eax, %edi
	callq	_MINOR
	movl	%eax, %ebx
	movq	_MSPRO_BLOCK_PART_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_mspro_block_disk_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testq	%r15, %r15
	je	LBB0_4
## %bb.1:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	decq	%rax
	movq	%rax, (%r15)
	jne	LBB0_4
LBB0_3:
	movq	%r15, %rdi
	callq	_kfree
	movq	$0, (%r14)
	movq	_mspro_block_disk_idr@GOTPCREL(%rip), %rdi
	movl	%ebx, %esi
	callq	_idr_remove
	movq	%r14, %rdi
	callq	_put_disk
LBB0_4:
	movq	_mspro_block_disk_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSPRO_BLOCK_PART_SHIFT,4,2     ## @MSPRO_BLOCK_PART_SHIFT
	.comm	_mspro_block_disk_lock,4,2      ## @mspro_block_disk_lock
	.comm	_mspro_block_disk_idr,4,2       ## @mspro_block_disk_idr
	.no_dead_strip	_mspro_block_disk_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mspro_block_disk_release
_mspro_block_disk_release:              ; @mspro_block_disk_release
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0]
	bl	_disk_devt
	bl	_MINOR
	mov	x21, x0
Lloh0:
	adrp	x8, _MSPRO_BLOCK_PART_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSPRO_BLOCK_PART_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x0, _mspro_block_disk_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _mspro_block_disk_lock@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	x20, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	subs	x8, x8, #1
	str	x8, [x20]
	b.ne	LBB0_4
LBB0_3:
	asr	w21, w21, w22
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
Lloh5:
	adrp	x0, _mspro_block_disk_idr@GOTPAGE
Lloh6:
	ldr	x0, [x0, _mspro_block_disk_idr@GOTPAGEOFF]
	mov	x1, x21
	bl	_idr_remove
	mov	x0, x19
	bl	_put_disk
LBB0_4:
Lloh7:
	adrp	x0, _mspro_block_disk_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _mspro_block_disk_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSPRO_BLOCK_PART_SHIFT,4,2     ; @MSPRO_BLOCK_PART_SHIFT
	.comm	_mspro_block_disk_lock,4,2      ; @mspro_block_disk_lock
	.comm	_mspro_block_disk_idr,4,2       ; @mspro_block_disk_idr
	.no_dead_strip	_mspro_block_disk_release
.subsections_via_symbols
