	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_gd_release
_ide_gd_release:                        ## @ide_gd_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	_ide_disk_obj@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ide_drv_g
	movq	%rax, %rbx
	movq	8(%rax), %r15
	movq	_IDE_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ide_debug_log
	movq	_ide_gd_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$1, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*8(%rax)
LBB0_2:
	movq	_IDE_DFLAG_REMOVABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.3:
	cmpl	$1, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	*(%rax)
	movq	_IDE_DFLAG_FORMAT_IN_PROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r15)
LBB0_5:
	decl	(%rbx)
	movq	%rbx, %rdi
	callq	_ide_disk_put
	movq	_ide_gd_mutex@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ide_disk_obj,4,2               ## @ide_disk_obj
	.comm	_IDE_DBG_FUNC,4,2               ## @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter"

	.comm	_ide_gd_mutex,4,2               ## @ide_gd_mutex
	.comm	_IDE_DFLAG_REMOVABLE,4,2        ## @IDE_DFLAG_REMOVABLE
	.comm	_IDE_DFLAG_FORMAT_IN_PROGRESS,4,2 ## @IDE_DFLAG_FORMAT_IN_PROGRESS
	.no_dead_strip	_ide_gd_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_gd_release
_ide_gd_release:                        ; @ide_gd_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	x20, x0
Lloh0:
	adrp	x8, _ide_disk_obj@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ide_disk_obj@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ide_drv_g
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh3:
	adrp	x8, _IDE_DBG_FUNC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDE_DBG_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ide_debug_log
Lloh8:
	adrp	x0, _ide_gd_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ide_gd_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	mov	x0, x21
	blr	x8
LBB0_2:
	ldr	w8, [x21]
Lloh10:
	adrp	x9, _IDE_DFLAG_REMOVABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IDE_DFLAG_REMOVABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	blr	x8
Lloh13:
	adrp	x8, _IDE_DFLAG_FORMAT_IN_PROGRESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IDE_DFLAG_FORMAT_IN_PROGRESS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
LBB0_5:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_ide_disk_put
Lloh16:
	adrp	x0, _ide_gd_mutex@GOTPAGE
Lloh17:
	ldr	x0, [x0, _ide_gd_mutex@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	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ide_disk_obj,4,2               ; @ide_disk_obj
	.comm	_IDE_DBG_FUNC,4,2               ; @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter"

	.comm	_ide_gd_mutex,4,2               ; @ide_gd_mutex
	.comm	_IDE_DFLAG_REMOVABLE,4,2        ; @IDE_DFLAG_REMOVABLE
	.comm	_IDE_DFLAG_FORMAT_IN_PROGRESS,4,2 ; @IDE_DFLAG_FORMAT_IN_PROGRESS
	.no_dead_strip	_ide_gd_release
.subsections_via_symbols
