	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_til_ready
_wait_til_ready:                        ## @wait_til_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_FDCS@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	$-1, %r15d
	cmpl	$0, (%rax)
	jne	LBB0_8
## %bb.1:
	movl	$10000, %ebx                    ## imm = 0x2710
	movq	_FD_STATUS@GOTPCREL(%rip), %r12
	movq	_STATUS_READY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_fd_inb
	testl	%eax, (%r13)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	jne	LBB0_3
## %bb.5:
	movq	_initialising@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_7
## %bb.6:
	movq	_fdc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DPRINT
	xorl	%eax, %eax
	callq	_show_floppy
LBB0_7:
	movq	(%r14), %rax
	movl	$1, (%rax)
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FDCS,8,3                       ## @FDCS
	.comm	_FD_STATUS,4,2                  ## @FD_STATUS
	.comm	_STATUS_READY,4,2               ## @STATUS_READY
	.comm	_initialising,4,2               ## @initialising
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Getstatus times out (%x) on fdc %d\n"

	.comm	_fdc,4,2                        ## @fdc
	.no_dead_strip	_wait_til_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_til_ready
_wait_til_ready:                        ; @wait_til_ready
	.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
Lloh0:
	adrp	x19, _FDCS@GOTPAGE
Lloh1:
	ldr	x19, [x19, _FDCS@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w8, [x8]
	cbnz	w8, LBB0_7
; %bb.1:
	mov	w20, #10000
Lloh2:
	adrp	x21, _FD_STATUS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FD_STATUS@GOTPAGEOFF]
Lloh4:
	adrp	x22, _STATUS_READY@GOTPAGE
Lloh5:
	ldr	x22, [x22, _STATUS_READY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_fd_inb
	mov	x1, x0
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w20, w20, #1
	b.ne	LBB0_2
; %bb.4:
Lloh6:
	adrp	x8, _initialising@GOTPAGE
Lloh7:
	ldr	x8, [x8, _initialising@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbnz	w8, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _fdc@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fdc@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT
	bl	_show_floppy
LBB0_6:
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
LBB0_7:
	mov	w1, #-1
LBB0_8:
	mov	x0, x1
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FDCS,8,3                       ; @FDCS
	.comm	_FD_STATUS,4,2                  ; @FD_STATUS
	.comm	_STATUS_READY,4,2               ; @STATUS_READY
	.comm	_initialising,4,2               ; @initialising
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Getstatus times out (%x) on fdc %d\n"

	.comm	_fdc,4,2                        ; @fdc
	.no_dead_strip	_wait_til_ready
.subsections_via_symbols
