	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fdc_specify
_fdc_specify:                           ## @fdc_specify
	.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	_NOMINAL_DTR@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_FDCS@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_3
## %bb.1:
	movq	(%rax), %rcx
	movq	_FDC_82072A@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_fdc_configure
	movq	(%r15), %rax
	movq	$0, 16(%rax)
LBB0_3:
	movq	_raw_cmd@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	andl	$3, %ecx
	cmpl	$1, %ecx
	je	LBB0_7
## %bb.4:
	cmpl	$2, %ecx
	je	LBB0_10
## %bb.5:
	movq	%rbx, %r14
	cmpl	$3, %ecx
	jne	LBB0_11
## %bb.6:
	movl	$1000, %r14d                    ## imm = 0x3E8
	jmp	LBB0_11
LBB0_10:
	movl	$250, %r14d
	jmp	LBB0_11
LBB0_7:
	movq	(%rax), %rax
	movq	_FDC_82078@GOTPCREL(%rip), %rcx
	movl	$300, %r14d                     ## imm = 0x12C
	cmpq	(%rcx), %rax
	jl	LBB0_11
## %bb.8:
	movq	_FD_DRIVESPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_output_byte
	xorl	%eax, %eax
	callq	_need_more_output
	movq	_MORE_OUTPUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.9:
	movq	_current_drive@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_UNIT
	movl	%eax, %edi
	callq	_output_byte
	movl	$192, %edi
	callq	_output_byte
LBB0_11:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_FDC_82072@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	cmovlq	%rbx, %r14
	movl	$127, %r12d
	cmovgel	%edx, %r12d
	movl	$15, %ebx
	cmovgeq	%rdx, %rbx
	movq	_DP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	imulq	%r14, %rax
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rcx
	movq	%rdx, %rdi
	shrq	$4, %rdi
	movq	(%r13), %rsi
	callq	_DIV_ROUND_UP
	movl	$16, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	movq	_slow_floppy@GOTPCREL(%rip), %rcx
	movq	%r13, %r15
	movq	%rax, %r13
	shrq	$2, %r13
	cmpq	$0, (%rcx)
	cmoveq	%rax, %r13
	movq	%r13, %rdi
	movl	$15, %esi
	callq	_SUPBOUND
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_INFBOUND
	movq	_DP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rdi
	imulq	%r14, %rdi
	shrq	%rdi
	movq	(%r15), %rsi
	callq	_DIV_ROUND_UP
	movl	%eax, %r15d
	cmpl	$127, %eax
	cmovbel	%eax, %r12d
	movq	_DP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	16(%rax), %r14
	shrq	$4, %r14
	movq	_NOMINAL_DTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_DIV_ROUND_UP
	movl	%eax, %ecx
	cmpl	$16, %eax
	cmovaeq	%rbx, %rcx
	testl	%eax, %eax
	movl	$1, %eax
	cmovneq	%rcx, %rax
	shlq	$4, %r13
	orq	%rax, %r13
	addb	%r12b, %r12b
	testl	%r15d, %r15d
	movq	_FDCS@GOTPCREL(%rip), %r15
	movzbl	%r12b, %eax
	movl	$2, %ecx
	cmovnel	%eax, %ecx
	movq	_use_virtual_dma@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	andb	$1, %bl
	orb	%cl, %bl
	movq	(%r15), %rax
	cmpb	%r13b, 8(%rax)
	jne	LBB0_14
## %bb.12:
	cmpb	%bl, 9(%rax)
	jne	LBB0_14
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movzbl	%r13b, %r14d
	movq	_FD_SPECIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_output_byte
	movq	(%r15), %rax
	movb	%r13b, 8(%rax)
	movl	%r14d, %edi
	callq	_output_byte
	movq	(%r15), %rax
	movb	%bl, 9(%rax)
	movzbl	%bl, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_output_byte                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NOMINAL_DTR,8,3                ## @NOMINAL_DTR
	.comm	_FDCS,8,3                       ## @FDCS
	.comm	_FDC_82072A,8,3                 ## @FDC_82072A
	.comm	_raw_cmd,8,3                    ## @raw_cmd
	.comm	_FDC_82078,8,3                  ## @FDC_82078
	.comm	_FD_DRIVESPEC,4,2               ## @FD_DRIVESPEC
	.comm	_MORE_OUTPUT,4,2                ## @MORE_OUTPUT
	.comm	_current_drive,4,2              ## @current_drive
	.comm	_FDC_82072,8,3                  ## @FDC_82072
	.comm	_DP,8,3                         ## @DP
	.comm	_slow_floppy,8,3                ## @slow_floppy
	.comm	_use_virtual_dma,4,2            ## @use_virtual_dma
	.comm	_FD_SPECIFY,4,2                 ## @FD_SPECIFY
	.no_dead_strip	_fdc_specify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fdc_specify
_fdc_specify:                           ; @fdc_specify
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x22, _NOMINAL_DTR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NOMINAL_DTR@GOTPAGEOFF]
	ldr	x19, [x22]
Lloh2:
	adrp	x21, _FDCS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FDCS@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _FDC_82072A@GOTPAGE
Lloh5:
	ldr	x10, [x10, _FDC_82072A@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_3
; %bb.2:
	bl	_fdc_configure
	ldr	x8, [x21]
	str	xzr, [x8, #16]
LBB0_3:
Lloh7:
	adrp	x9, _raw_cmd@GOTPAGE
Lloh8:
	ldr	x9, [x9, _raw_cmd@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	ldr	w9, [x9]
	and	w9, w9, #0x3
	cmp	w9, #1
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #250
	cmp	w9, #3
	mov	w10, #1000
	csel	x10, x19, x10, ne
	cmp	w9, #2
	csel	x8, x8, x10, eq
	b	LBB0_9
LBB0_5:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _FDC_82078@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FDC_82078@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.6:
Lloh13:
	adrp	x8, _FD_DRIVESPEC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FD_DRIVESPEC@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_output_byte
	bl	_need_more_output
Lloh16:
	adrp	x8, _MORE_OUTPUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MORE_OUTPUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
Lloh19:
	adrp	x8, _current_drive@GOTPAGE
Lloh20:
	ldr	x8, [x8, _current_drive@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_UNIT
	bl	_output_byte
	mov	w0, #192
	bl	_output_byte
LBB0_8:
	mov	w8, #300
LBB0_9:
	ldr	x9, [x21]
Lloh22:
	adrp	x10, _FDC_82072@GOTPAGE
Lloh23:
	ldr	x10, [x10, _FDC_82072@GOTPAGEOFF]
	ldr	x9, [x9]
Lloh24:
	ldr	x10, [x10]
	cmp	x9, x10
	csel	x24, x19, x8, lt
	mov	w8, #127
	csel	w25, w8, wzr, lt
	mov	w8, #15
	csel	x23, x8, xzr, lt
Lloh25:
	adrp	x26, _DP@GOTPAGE
Lloh26:
	ldr	x26, [x26, _DP@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x8, [x8]
	mul	x8, x8, x24
	lsr	x8, x8, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x0, x8, #4
	ldr	x1, [x22]
	bl	_DIV_ROUND_UP
	mov	w8, #16
	sub	w8, w8, w0
	sxtw	x8, w8
Lloh27:
	adrp	x9, _slow_floppy@GOTPAGE
Lloh28:
	ldr	x9, [x9, _slow_floppy@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	lsr	x10, x8, #2
	cmp	x9, #0
	csel	x19, x8, x10, eq
	mov	x0, x19
	mov	w1, #15
	bl	_SUPBOUND
	mov	x0, x19
	mov	w1, #0
	bl	_INFBOUND
	ldr	x8, [x26]
	ldr	x8, [x8, #8]
	mul	x8, x8, x24
	lsr	x0, x8, #1
	ldr	x1, [x22]
	bl	_DIV_ROUND_UP
	mov	x20, x0
	cmp	w0, #127
	csel	w25, w25, w0, hi
	ldr	x8, [x26]
	ldr	x8, [x8, #16]
	mul	x8, x8, x24
	lsr	x0, x8, #4
	ldr	x1, [x22]
	bl	_DIV_ROUND_UP
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #15
	csel	x8, x23, x0, hi
	cmp	w0, #0
	csinc	x8, x8, xzr, ne
	orr	w22, w8, w19, lsl #4
	lsl	w8, w25, #1
	mov	w9, #2
	cmp	w20, #0
	csel	w20, w9, w8, eq
Lloh30:
	adrp	x8, _use_virtual_dma@GOTPAGE
Lloh31:
	ldr	x8, [x8, _use_virtual_dma@GOTPAGEOFF]
	ldrb	w8, [x8]
	bfxil	w20, w8, #0, #1
	ldr	x8, [x21]
	ldrb	w9, [x8, #8]
	and	w19, w22, #0xff
	cmp	w9, w19
	b.ne	LBB0_12
; %bb.10:
	ldrb	w8, [x8, #9]
	cmp	w8, w20, uxtb
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh32:
	adrp	x8, _FD_SPECIFY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FD_SPECIFY@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_output_byte
	ldr	x8, [x21]
	strb	w22, [x8, #8]
	mov	x0, x19
	bl	_output_byte
	ldr	x8, [x21]
	strb	w20, [x8, #9]
	and	w0, w20, #0xff
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_output_byte
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_NOMINAL_DTR,8,3                ; @NOMINAL_DTR
	.comm	_FDCS,8,3                       ; @FDCS
	.comm	_FDC_82072A,8,3                 ; @FDC_82072A
	.comm	_raw_cmd,8,3                    ; @raw_cmd
	.comm	_FDC_82078,8,3                  ; @FDC_82078
	.comm	_FD_DRIVESPEC,4,2               ; @FD_DRIVESPEC
	.comm	_MORE_OUTPUT,4,2                ; @MORE_OUTPUT
	.comm	_current_drive,4,2              ; @current_drive
	.comm	_FDC_82072,8,3                  ; @FDC_82072
	.comm	_DP,8,3                         ; @DP
	.comm	_slow_floppy,8,3                ; @slow_floppy
	.comm	_use_virtual_dma,4,2            ; @use_virtual_dma
	.comm	_FD_SPECIFY,4,2                 ; @FD_SPECIFY
	.no_dead_strip	_fdc_specify
.subsections_via_symbols
