	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_floppy_geometry
_get_floppy_geometry:                   ## @get_floppy_geometry
	.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	%rdx, %r14
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_floppy_type@GOTPCREL(%rip), %rax
	movslq	%esi, %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	jmp	LBB0_3
LBB0_2:
	movl	%edi, %ebx
	xorl	%esi, %esi
	callq	_LOCK_FDC
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_poll_drive
	movl	%eax, %edi
	callq	_CALL
	xorl	%eax, %eax
	callq	_process_fd_request
	movq	_current_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rcx
LBB0_3:
	movq	%rcx, (%r14)
	movq	_ENODEV@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	testq	%rcx, %rcx
	cmovnel	%edx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_floppy_type,8,3                ## @floppy_type
	.comm	_current_type,8,3               ## @current_type
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_get_floppy_geometry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_floppy_geometry
_get_floppy_geometry:                   ; @get_floppy_geometry
	.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
	mov	x19, x2
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _floppy_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _floppy_type@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, w1, sxtw #2
	b	LBB0_3
LBB0_2:
	mov	x20, x0
	bl	_LOCK_FDC
	mov	w0, #0
	mov	w1, #0
	bl	_poll_drive
	bl	_CALL
	bl	_process_fd_request
Lloh3:
	adrp	x8, _current_type@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current_type@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, w20, sxtw #3]
LBB0_3:
	str	x8, [x19]
Lloh6:
	adrp	x9, _ENODEV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csneg	w0, wzr, w9, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_floppy_type,8,3                ; @floppy_type
	.comm	_current_type,8,3               ; @current_type
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_get_floppy_geometry
.subsections_via_symbols
