	.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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_floppy_type@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jle	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	movslq	%ebx, %rax
	shlq	$2, %rax
	addq	(%r12), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_4:
	movq	(%r15), %rax
	movq	_HD_MEDIA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	(%r12), %rax
	addq	$12, %rax
	jmp	LBB0_9
LBB0_6:
	cmpl	$2, 8(%r15)
	movq	(%r12), %rax
	jne	LBB0_8
## %bb.7:
	addq	$8, %rax
	jmp	LBB0_9
LBB0_8:
	addq	$4, %rax
LBB0_9:
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_floppy_type,8,3                ## @floppy_type
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HD_MEDIA,8,3                   ## @HD_MEDIA
	.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	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _floppy_type@GOTPAGE
Lloh1:
	ldr	x22, [x22, _floppy_type@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, w21
	b.le	LBB0_3
; %bb.1:
	cbz	w21, LBB0_4
; %bb.2:
	mov	w0, #0
	ldr	x8, [x22]
	add	x8, x8, w21, sxtw #2
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_4:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _HD_MEDIA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HD_MEDIA@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	ldr	x8, [x22]
	add	x8, x8, #12
	b	LBB0_9
LBB0_6:
	ldr	w9, [x20, #8]
	ldr	x8, [x22]
	cmp	w9, #2
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	add	x8, x8, #8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	add	x8, x8, #4
LBB0_9:
	str	x8, [x19]
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_floppy_type,8,3                ; @floppy_type
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HD_MEDIA,8,3                   ; @HD_MEDIA
	.no_dead_strip	_get_floppy_geometry
.subsections_via_symbols
