	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function SDL_SpeedSamplerAdd
LCPI0_0:
	.long	0x447a0000                      ## float 1000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SDL_SpeedSamplerAdd
	.p2align	4, 0x90
_SDL_SpeedSamplerAdd:                   ## @SDL_SpeedSamplerAdd
	.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
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_SDL_GetTickHR
	movq	(%rbx), %rcx
	movq	8(%rbx), %rax
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	movslq	16(%rbx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, 8(%rbx)
	movl	20(%rbx), %edi
	leal	1(%rdi), %eax
	cmpl	%esi, %eax
	jge	LBB0_4
## %bb.5:
	movl	%eax, 20(%rbx)
	movl	%eax, %edi
	jmp	LBB0_6
LBB0_4:
	movl	24(%rbx), %eax
	incl	%eax
	cltd
	idivl	%esi
	movl	%edx, 24(%rbx)
LBB0_6:
	xorps	%xmm2, %xmm2
	cmpl	$2, %edi
	jl	LBB0_11
## %bb.7:
	decl	%edi
	xorps	%xmm2, %xmm2
	cvtsi2ss	%edi, %xmm2
	mulss	LCPI0_0(%rip), %xmm2
	movslq	24(%rbx), %rax
	movaps	%xmm0, %xmm1
	subss	(%rcx,%rax,4), %xmm1
	divss	%xmm1, %xmm2
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.8:
	movss	28(%rbx), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	ja	LBB0_10
## %bb.9:
	addss	LCPI0_0(%rip), %xmm1
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_11
LBB0_10:
	movss	%xmm0, 28(%rbx)
	testq	%r14, %r14
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%r14, %rsi
	leaq	L_.str(%rip), %rdi
	movaps	%xmm2, %xmm0
	movss	%xmm2, -28(%rbp)                ## 4-byte Spill
	callq	_ALOGW
	movss	-28(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
LBB0_11:
	movaps	%xmm2, %xmm0
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %.2f\n"

L_.str.1:                               ## @.str.1
	.asciz	"N/A"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SpeedSamplerAdd            ; -- Begin function SDL_SpeedSamplerAdd
	.p2align	2
_SDL_SpeedSamplerAdd:                   ; @SDL_SpeedSamplerAdd
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset b8, -56
	.cfi_offset b9, -64
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_SDL_GetTickHR
	ldp	x8, x9, [x20]
	str	s0, [x8, x9, lsl #2]
	add	x11, x9, #1
	ldp	w10, w9, [x20, #16]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	udiv	x12, x11, x10
	msub	x11, x12, x10, x11
	str	x11, [x20, #8]
	add	w11, w9, #1
	cmp	w11, w10
	b.ge	LBB0_2
; %bb.1:
	str	w11, [x20, #20]
	mov	x9, x11
	b	LBB0_3
LBB0_2:
	ldr	w11, [x20, #24]
	add	w11, w11, #1
	sdiv	w12, w11, w10
	msub	w10, w12, w10, w11
	str	w10, [x20, #24]
LBB0_3:
	movi	d8, #0000000000000000
	cmp	w9, #2
	b.lt	LBB0_8
; %bb.4:
	sub	w9, w9, #1
	scvtf	s1, w9
	mov	w9, #1148846080
	fmov	s2, w9
	fmul	s1, s1, s2
	ldrsw	x9, [x20, #24]
	ldr	s2, [x8, x9, lsl #2]
	fsub	s2, s0, s2
	fdiv	s8, s1, s2
	cbz	w21, LBB0_8
; %bb.5:
	ldr	s1, [x20, #28]
	fcmp	s1, s0
	b.gt	LBB0_7
; %bb.6:
	mov	w8, #1148846080
	fmov	s2, w8
	fadd	s1, s1, s2
	fcmp	s1, s0
	b.pl	LBB0_8
LBB0_7:
	str	s0, [x20, #28]
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x19, #0
	csel	x1, x8, x19, eq
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	fmov	s0, s8
	bl	_ALOGW
LBB0_8:
	fmov	s0, s8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %.2f\n"

l_.str.1:                               ; @.str.1
	.asciz	"N/A"

.subsections_via_symbols
