	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_unregister
_ide_unregister:                        ## @ide_unregister
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_in_interrupt
	movl	%eax, %edi
	callq	_BUG_ON
	xorl	%eax, %eax
	callq	_irqs_disabled
	movl	%eax, %edi
	callq	_BUG_ON
	movq	_ide_cfg_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpq	$0, 40(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	___ide_port_unregister_devices
	movq	$0, 40(%rbx)
LBB0_2:
	movq	%rbx, %rdi
	callq	_ide_proc_unregister_port
	movl	32(%rbx), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	24(%rbx), %rdi
	callq	_device_unregister
	leaq	16(%rbx), %rdi
	callq	_device_unregister
	leaq	12(%rbx), %rdi
	callq	_wait_for_completion
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_MKDEV
	movq	_MAX_DRIVES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PARTN_BITS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	%eax, %edi
	callq	_blk_unregister_region
	movl	8(%rbx), %edi
	callq	_kfree
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_unregister_blkdev
	movq	%rbx, %rdi
	callq	_ide_release_dma_engine
	movq	_ide_cfg_mtx@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ide_cfg_mtx,4,2                ## @ide_cfg_mtx
	.comm	_MAX_DRIVES,4,2                 ## @MAX_DRIVES
	.comm	_PARTN_BITS,4,2                 ## @PARTN_BITS
	.no_dead_strip	_ide_unregister
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_unregister
_ide_unregister:                        ; @ide_unregister
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_in_interrupt
	bl	_BUG_ON
	bl	_irqs_disabled
	bl	_BUG_ON
Lloh0:
	adrp	x0, _ide_cfg_mtx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ide_cfg_mtx@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	___ide_port_unregister_devices
	str	xzr, [x19, #40]
LBB0_2:
	mov	x0, x19
	bl	_ide_proc_unregister_port
	ldr	w0, [x19, #32]
	mov	x1, x19
	bl	_free_irq
	ldr	x0, [x19, #24]
	bl	_device_unregister
	add	x0, x19, #16
	bl	_device_unregister
	add	x0, x19, #12
	bl	_wait_for_completion
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_MKDEV
Lloh2:
	adrp	x8, _MAX_DRIVES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_DRIVES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _PARTN_BITS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PARTN_BITS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w1, w8, w9
	bl	_blk_unregister_region
	ldr	w0, [x19, #8]
	bl	_kfree
	ldp	w1, w0, [x19]
	bl	_unregister_blkdev
	mov	x0, x19
	bl	_ide_release_dma_engine
Lloh8:
	adrp	x0, _ide_cfg_mtx@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ide_cfg_mtx@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ide_cfg_mtx,4,2                ; @ide_cfg_mtx
	.comm	_MAX_DRIVES,4,2                 ; @MAX_DRIVES
	.comm	_PARTN_BITS,4,2                 ; @PARTN_BITS
	.no_dead_strip	_ide_unregister
.subsections_via_symbols
