	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_fdc
_reset_fdc:                             ## @reset_fdc
	.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	_reset_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_do_floppy@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_FDCS@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	$0, 16(%rax)
	xorl	%edi, %edi
	callq	_reset_fdc_info
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_fd_disable_dma
	movq	%rbx, %rdi
	callq	_release_dma_lock
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	_FDC_82072A@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_1
## %bb.2:
	movl	12(%rax), %edi
	andl	$-5, %edi
	movq	_FD_DOR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_fd_outb
	movq	_FD_RESET_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	movq	(%r14), %rax
	movl	12(%rax), %edi
	jmp	LBB0_3
LBB0_1:
	movl	8(%rax), %edi
	andl	$3, %edi
	orl	$128, %edi
	movq	_FD_STATUS@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rbx), %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_fd_outb                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_reset_interrupt,4,2            ## @reset_interrupt
	.comm	_do_floppy,4,2                  ## @do_floppy
	.comm	_FDCS,8,3                       ## @FDCS
	.comm	_FDC_82072A,8,3                 ## @FDC_82072A
	.comm	_FD_STATUS,4,2                  ## @FD_STATUS
	.comm	_FD_DOR,4,2                     ## @FD_DOR
	.comm	_FD_RESET_DELAY,4,2             ## @FD_RESET_DELAY
	.no_dead_strip	_reset_fdc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_fdc
_reset_fdc:                             ; @reset_fdc
	.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	x8, _reset_interrupt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reset_interrupt@GOTPAGEOFF]
Lloh2:
	adrp	x9, _do_floppy@GOTPAGE
Lloh3:
	ldr	x9, [x9, _do_floppy@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	str	w8, [x9]
Lloh6:
	adrp	x20, _FDCS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _FDCS@GOTPAGEOFF]
	ldr	x8, [x20]
	str	xzr, [x8, #16]
	mov	w0, #0
	bl	_reset_fdc_info
	bl	_claim_dma_lock
	mov	x19, x0
	bl	_fd_disable_dma
	mov	x0, x19
	bl	_release_dma_lock
	ldr	x8, [x20]
	ldr	x9, [x8]
Lloh8:
	adrp	x10, _FDC_82072A@GOTPAGE
Lloh9:
	ldr	x10, [x10, _FDC_82072A@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_2
; %bb.1:
	ldr	w8, [x8, #12]
	and	w0, w8, #0xfffffffb
Lloh11:
	adrp	x19, _FD_DOR@GOTPAGE
Lloh12:
	ldr	x19, [x19, _FD_DOR@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_fd_outb
Lloh13:
	adrp	x8, _FD_RESET_DELAY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FD_RESET_DELAY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_udelay
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x8, #8]
	mov	w0, #128
	bfxil	w0, w8, #0, #2
Lloh16:
	adrp	x19, _FD_STATUS@GOTPAGE
Lloh17:
	ldr	x19, [x19, _FD_STATUS@GOTPAGEOFF]
LBB0_3:
	ldr	w1, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fd_outb
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_reset_interrupt,4,2            ; @reset_interrupt
	.comm	_do_floppy,4,2                  ; @do_floppy
	.comm	_FDCS,8,3                       ; @FDCS
	.comm	_FDC_82072A,8,3                 ; @FDC_82072A
	.comm	_FD_STATUS,4,2                  ; @FD_STATUS
	.comm	_FD_DOR,4,2                     ; @FD_DOR
	.comm	_FD_RESET_DELAY,4,2             ; @FD_RESET_DELAY
	.no_dead_strip	_reset_fdc
.subsections_via_symbols
