	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function old_gameport_measure_speed
_old_gameport_measure_speed:            ## @old_gameport_measure_speed
	.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	%rdi, %r14
	movq	_GAMEPORT_MODE_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_gameport_open
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movl	$1073741824, %r12d              ## imm = 0x40000000
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	callq	_local_irq_save
	xorl	%eax, %eax
	callq	_rdtsc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$50, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_gameport_read
	decl	%ebx
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_rdtsc
	movq	%rax, %r15
	callq	_local_irq_restore
	leal	(%r13,%r13), %eax
	leal	(%rax,%rax,4), %edi
	callq	_udelay
	subq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	cmpq	%r12, %r15
	cmovbq	%r15, %r12
	incl	%r13d
	cmpl	$50, %r13d
	jne	LBB0_2
## %bb.5:
	movq	%r14, %rdi
	callq	_gameport_close
	movq	_cpu_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_this_cpu_read
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imulq	%rcx, %rax
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rcx
	shrq	$4, %rdx
	testq	%r12, %r12
	movl	$1, %ecx
	cmovneq	%r12, %rcx
	movq	%rdx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%rdx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_8
LBB0_6:
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GAMEPORT_MODE_RAW,4,2          ## @GAMEPORT_MODE_RAW
	.comm	_cpu_info,4,2                   ## @cpu_info
	.comm	_HZ,4,2                         ## @HZ
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_old_gameport_measure_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function old_gameport_measure_speed
_old_gameport_measure_speed:            ; @old_gameport_measure_speed
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _GAMEPORT_MODE_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GAMEPORT_MODE_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_gameport_open
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GAMEPORT_MODE_RAW,4,2          ; @GAMEPORT_MODE_RAW
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_cpu_info,4,2                   ; @cpu_info
	.no_dead_strip	_old_gameport_measure_speed
.subsections_via_symbols
