	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function floppy_shutdown
_floppy_shutdown:                       ## @floppy_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_initialising@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_show_floppy
LBB0_2:
	xorl	%eax, %eax
	callq	_cancel_activity
	xorl	%eax, %eax
	callq	_floppy_enable_hlt
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_fd_disable_dma
	movq	%rbx, %rdi
	callq	_release_dma_lock
	cmpl	$0, (%r14)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINT
LBB0_4:
	movq	_FDCS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	_cont@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	callq	*8(%rax)
	movq	(%rbx), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
	xorl	%eax, %eax
	callq	_process_fd_request
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_is_alive                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_initialising,4,2               ## @initialising
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"floppy timeout called\n"

	.comm	_FDCS,8,3                       ## @FDCS
	.comm	_cont,8,3                       ## @cont
L_.str.1:                               ## @.str.1
	.asciz	"no cont in shutdown!\n"

L_.str.2:                               ## @.str.2
	.asciz	"floppy shutdown"

	.no_dead_strip	_floppy_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function floppy_shutdown
_floppy_shutdown:                       ; @floppy_shutdown
	.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
Lloh0:
	adrp	x20, _initialising@GOTPAGE
Lloh1:
	ldr	x20, [x20, _initialising@GOTPAGEOFF]
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
; %bb.1:
	bl	_show_floppy
LBB0_2:
	bl	_cancel_activity
	bl	_floppy_enable_hlt
	bl	_claim_dma_lock
	mov	x19, x0
	bl	_fd_disable_dma
	mov	x0, x19
	bl	_release_dma_lock
	ldr	w8, [x20]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT
LBB0_4:
Lloh4:
	adrp	x8, _FDCS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FDCS@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
Lloh7:
	adrp	x19, _cont@GOTPAGE
Lloh8:
	ldr	x19, [x19, _cont@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x8, #8]
	mov	w0, #0
	blr	x8
	ldr	x8, [x19]
	ldr	x8, [x8]
	blr	x8
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	bl	_process_fd_request
LBB0_7:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_is_alive
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_initialising,4,2               ; @initialising
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"floppy timeout called\n"

	.comm	_FDCS,8,3                       ; @FDCS
	.comm	_cont,8,3                       ; @cont
l_.str.1:                               ; @.str.1
	.asciz	"no cont in shutdown!\n"

l_.str.2:                               ; @.str.2
	.asciz	"floppy shutdown"

	.no_dead_strip	_floppy_shutdown
.subsections_via_symbols
