	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fd_motor_off_timer
_fd_motor_off_timer:                    ## @fd_motor_off_timer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_SelectedDrive@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	js	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_stdma_islocked
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	_MotorOffTrys@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	leal	1(%rdx), %esi
	movl	%esi, (%rax)
	movq	_FD_MOTOR_OFF_MAXTRY@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$20, %edx
	movl	$2, %esi
	cmovgl	%edx, %esi
	cltd
	idivl	%esi
	movslq	%eax, %rsi
	addq	(%rcx), %rsi
	movq	_motor_off_timer@GOTPCREL(%rip), %rdi
	popq	%rbp
	jmp	_mod_timer                      ## TAILCALL
LBB0_4:
	popq	%rbp
	retq
LBB0_2:
	movq	_FDCREG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FDC_READ
	testb	%al, %al
	js	LBB0_3
## %bb.5:
	movq	_MotorOn@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
	popq	%rbp
	jmp	_fd_deselect                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SelectedDrive,8,3              ## @SelectedDrive
	.comm	_FDCREG_STATUS,4,2              ## @FDCREG_STATUS
	.comm	_MotorOn,8,3                    ## @MotorOn
	.comm	_motor_off_timer,4,2            ## @motor_off_timer
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MotorOffTrys,4,2               ## @MotorOffTrys
	.comm	_FD_MOTOR_OFF_MAXTRY,8,3        ## @FD_MOTOR_OFF_MAXTRY
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_fd_motor_off_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fd_motor_off_timer
_fd_motor_off_timer:                    ; @fd_motor_off_timer
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _SelectedDrive@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SelectedDrive@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tbnz	x8, #63, LBB0_3
; %bb.1:
	bl	_stdma_islocked
	cbz	x0, LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _MotorOffTrys@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MotorOffTrys@GOTPAGEOFF]
	ldrsw	x10, [x9]
	add	w11, w10, #1
	str	w11, [x9]
Lloh8:
	adrp	x9, _FD_MOTOR_OFF_MAXTRY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FD_MOTOR_OFF_MAXTRY@GOTPAGEOFF]
Lloh10:
	adrp	x11, _HZ@GOTPAGE
Lloh11:
	ldr	x11, [x11, _HZ@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	ldr	w11, [x11]
	cmp	x9, x10
	mov	w9, #2
	mov	w10, #20
	csel	w9, w10, w9, gt
	sdiv	w9, w11, w9
	add	x1, x8, w9, sxtw
Lloh14:
	adrp	x0, _motor_off_timer@GOTPAGE
Lloh15:
	ldr	x0, [x0, _motor_off_timer@GOTPAGEOFF]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_mod_timer
LBB0_3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh16:
	adrp	x8, _FDCREG_STATUS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FDCREG_STATUS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_FDC_READ
	tbnz	w0, #7, LBB0_2
; %bb.5:
Lloh19:
	adrp	x8, _MotorOn@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MotorOn@GOTPAGEOFF]
Lloh21:
	str	xzr, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_fd_deselect
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SelectedDrive,8,3              ; @SelectedDrive
	.comm	_FDCREG_STATUS,4,2              ; @FDCREG_STATUS
	.comm	_MotorOn,8,3                    ; @MotorOn
	.comm	_motor_off_timer,4,2            ; @motor_off_timer
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MotorOffTrys,4,2               ; @MotorOffTrys
	.comm	_FD_MOTOR_OFF_MAXTRY,8,3        ; @FD_MOTOR_OFF_MAXTRY
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_fd_motor_off_timer
.subsections_via_symbols
