	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function floppy_ready
_floppy_ready:                          ## @floppy_ready
	.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
	leaq	_floppy_ready(%rip), %rdi
	callq	_start_motor
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	xorl	%eax, %eax
	callq	_fdc_dtr
	testq	%rax, %rax
	je	LBB0_2
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	_raw_cmd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_FD_RAW_NO_MOTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
LBB0_6:
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	_FD_RAW_NEED_SEEK@GOTPCREL(%rip), %rcx
	movq	_FD_RAW_NEED_DISK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_7
## %bb.12:
	xorl	%eax, %eax
	callq	_perpendicular_mode
	xorl	%eax, %eax
	callq	_fdc_specify
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_seek_floppy                    ## TAILCALL
LBB0_3:
	movq	_current_drive@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_disk_change
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_DP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_twaddle
	jmp	LBB0_6
LBB0_7:
	movq	_FD_RAW_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.8:
	movq	_FD_RAW_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	callq	_fdc_specify
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_setup_rw_floppy                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHECK_RESET,4,2                ## @CHECK_RESET
	.comm	_raw_cmd,8,3                    ## @raw_cmd
	.comm	_FD_RAW_NO_MOTOR,4,2            ## @FD_RAW_NO_MOTOR
	.comm	_current_drive,4,2              ## @current_drive
	.comm	_DP,8,3                         ## @DP
	.comm	_FD_RAW_NEED_SEEK,4,2           ## @FD_RAW_NEED_SEEK
	.comm	_FD_RAW_NEED_DISK,4,2           ## @FD_RAW_NEED_DISK
	.comm	_FD_RAW_READ,4,2                ## @FD_RAW_READ
	.comm	_FD_RAW_WRITE,4,2               ## @FD_RAW_WRITE
	.comm	_FD_DEBUG,4,2                   ## @FD_DEBUG
	.no_dead_strip	_floppy_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function floppy_ready
_floppy_ready:                          ; @floppy_ready
	.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	x0, _floppy_ready@PAGE
Lloh1:
	add	x0, x0, _floppy_ready@PAGEOFF
	bl	_start_motor
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_fdc_dtr
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh2:
	adrp	x19, _raw_cmd@GOTPAGE
Lloh3:
	ldr	x19, [x19, _raw_cmd@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _FD_RAW_NO_MOTOR@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FD_RAW_NO_MOTOR@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_4:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _FD_RAW_NEED_SEEK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _FD_RAW_NEED_SEEK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _FD_RAW_NEED_DISK@GOTPAGE
Lloh11:
	ldr	x10, [x10, _FD_RAW_NEED_DISK@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_9
; %bb.5:
	bl	_perpendicular_mode
	bl	_fdc_specify
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_seek_floppy
LBB0_6:
Lloh13:
	adrp	x8, _current_drive@GOTPAGE
Lloh14:
	ldr	x8, [x8, _current_drive@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_disk_change
	cbz	x0, LBB0_4
; %bb.7:
Lloh16:
	adrp	x8, _DP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DP@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_4
; %bb.8:
	bl	_twaddle
	b	LBB0_4
LBB0_9:
Lloh19:
	adrp	x9, _FD_RAW_READ@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FD_RAW_READ@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.10:
Lloh22:
	adrp	x9, _FD_RAW_WRITE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FD_RAW_WRITE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_11:
	bl	_fdc_specify
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_setup_rw_floppy
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_CHECK_RESET,4,2                ; @CHECK_RESET
	.comm	_raw_cmd,8,3                    ; @raw_cmd
	.comm	_FD_RAW_NO_MOTOR,4,2            ; @FD_RAW_NO_MOTOR
	.comm	_current_drive,4,2              ; @current_drive
	.comm	_DP,8,3                         ; @DP
	.comm	_FD_RAW_NEED_SEEK,4,2           ; @FD_RAW_NEED_SEEK
	.comm	_FD_RAW_NEED_DISK,4,2           ; @FD_RAW_NEED_DISK
	.comm	_FD_RAW_READ,4,2                ; @FD_RAW_READ
	.comm	_FD_RAW_WRITE,4,2               ; @FD_RAW_WRITE
	.comm	_FD_DEBUG,4,2                   ; @FD_DEBUG
	.no_dead_strip	_floppy_ready
.subsections_via_symbols
