	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function floppy_find
_floppy_find:                           ## @floppy_find
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %ebx
	movl	%ebx, %eax
	andl	$3, %eax
	shrq	$5, %rbx
	andl	$4, %ebx
	orq	%rax, %rbx
	movq	_N_DRIVE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_4
## %bb.1:
	movq	_allowed_drive_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%ebx, %eax
	jae	LBB0_4
## %bb.2:
	movq	%rsi, %r14
	movq	_fdc_state@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%ebx, %edi
	callq	_FDC
	movq	(%r15,%rax,8), %rax
	movq	_FDC_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %r15d
	shrl	$2, %r15d
	andl	$31, %r15d
	movq	_floppy_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r15d
	jge	LBB0_4
## %bb.5:
	movl	$0, (%r14)
	movq	_disks@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_get_disk                       ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_N_DRIVE,4,2                    ## @N_DRIVE
	.comm	_allowed_drive_mask,4,2         ## @allowed_drive_mask
	.comm	_fdc_state,8,3                  ## @fdc_state
	.comm	_FDC_NONE,8,3                   ## @FDC_NONE
	.comm	_floppy_type,4,2                ## @floppy_type
	.comm	_disks,8,3                      ## @disks
	.no_dead_strip	_floppy_find
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function floppy_find
_floppy_find:                           ; @floppy_find
	.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
	ldr	w8, [x1]
	lsr	x9, x8, #5
	and	x20, x9, #0x4
	bfxil	x20, x8, #0, #2
Lloh0:
	adrp	x8, _N_DRIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _N_DRIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ge	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _allowed_drive_mask@GOTPAGE
Lloh4:
	ldr	x8, [x8, _allowed_drive_mask@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsr	w8, w8, w20
	tbz	w8, #0, LBB0_5
; %bb.2:
	mov	x19, x1
Lloh6:
	adrp	x8, _fdc_state@GOTPAGE
Lloh7:
	ldr	x8, [x8, _fdc_state@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
	mov	x0, x20
	bl	_FDC
	ldr	x8, [x21, x0, lsl #3]
Lloh9:
	adrp	x9, _FDC_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FDC_NONE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x19]
	ubfx	w21, w8, #2, #5
Lloh12:
	adrp	x8, _floppy_type@GOTPAGE
Lloh13:
	ldr	x8, [x8, _floppy_type@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.ge	LBB0_5
; %bb.4:
	str	wzr, [x19]
Lloh15:
	adrp	x8, _disks@GOTPAGE
Lloh16:
	ldr	x8, [x8, _disks@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	w0, [x8, x20, lsl #2]
	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
	b	_get_disk
LBB0_5:
	mov	x0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_N_DRIVE,4,2                    ; @N_DRIVE
	.comm	_allowed_drive_mask,4,2         ; @allowed_drive_mask
	.comm	_fdc_state,8,3                  ; @fdc_state
	.comm	_FDC_NONE,8,3                   ; @FDC_NONE
	.comm	_floppy_type,4,2                ; @floppy_type
	.comm	_disks,8,3                      ; @disks
	.no_dead_strip	_floppy_find
.subsections_via_symbols
