	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SpeedSampler2GetSpeed      ## -- Begin function SDL_SpeedSampler2GetSpeed
	.p2align	4, 0x90
_SDL_SpeedSampler2GetSpeed:             ## @SDL_SpeedSampler2GetSpeed
	.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), %r15
	movq	8(%rdi), %rbx
	movq	16(%rdi), %r14
	movq	24(%rdi), %r13
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_SDL_GetTickHR
	movslq	%eax, %rdi
	subq	%rbx, %rdi
	callq	_llabs
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	cltq
	cmpq	%rax, %r15
	jle	LBB0_12
## %bb.2:
	addq	%rax, %r13
	cmpq	%r15, %r13
	jle	LBB0_3
## %bb.4:
	imulq	%r15, %r14
	movq	%r14, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rax
	cqto
	idivq	%r13
	movq	%rax, %r14
	testq	%r15, %r15
	jg	LBB0_9
	jmp	LBB0_8
LBB0_3:
	movq	%r13, %r15
	testq	%r15, %r15
	jle	LBB0_8
LBB0_9:
	imulq	$1000, %r14, %rax               ## imm = 0x3E8
	movq	%rax, %rcx
	orq	%r15, %rcx
	shrq	$32, %rcx
	je	LBB0_10
## %bb.11:
	cqto
	idivq	%r15
	movq	%rax, %r12
	jmp	LBB0_12
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %r12d
	jmp	LBB0_12
LBB0_5:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %r14d
	testq	%r15, %r15
	jg	LBB0_9
LBB0_8:
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SpeedSampler2GetSpeed      ; -- Begin function SDL_SpeedSampler2GetSpeed
	.p2align	2
_SDL_SpeedSampler2GetSpeed:             ; @SDL_SpeedSampler2GetSpeed
	.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
	ldp	x20, x22, [x0]
	ldp	x19, x21, [x0, #16]
	bl	_SDL_GetTickHR
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	sub	x0, x8, x22
	bl	_llabs
	mov	x8, x0
	mov	x0, #0
	tbnz	w8, #31, LBB0_7
; %bb.1:
	sxtw	x8, w8
	cmp	x20, x8
	b.le	LBB0_7
; %bb.2:
	add	x8, x21, x8
	cmp	x8, x20
	b.le	LBB0_4
; %bb.3:
	mul	x9, x19, x20
	sdiv	x19, x9, x8
	mov	x8, x20
LBB0_4:
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.5:
	mov	w9, #1000
	mul	x9, x19, x9
	sdiv	x0, x9, x8
	b	LBB0_7
LBB0_6:
	mov	x0, #0
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
