	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SpeedThrottle                  ## -- Begin function SpeedThrottle
	.p2align	4, 0x90
_SpeedThrottle:                         ## @SpeedThrottle
	.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
	xorl	%eax, %eax
	callq	_SDL_GetTicks
	imull	$10000, %eax, %r8d              ## imm = 0x2710
	movl	_SpeedThrottle.ltime(%rip), %r9d
	movl	%r8d, %edi
	subl	%r9d, %edi
	movq	_tfreq@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_desiredfps@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movl	%esi, %eax
	cltd
	idivl	%ebx
	movl	%eax, %ecx
	cmpl	%edi, %eax
	jle	LBB0_5
## %bb.1:
	movl	$3518437209, %r12d              ## imm = 0xD1B71759
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_SDL_GetTicks
	imull	$10000, %eax, %r8d              ## imm = 0x2710
	movl	_SpeedThrottle.ltime(%rip), %r9d
	movl	%r8d, %edi
	subl	%r9d, %edi
	movl	(%r14), %esi
	movl	(%r15), %ebx
	movl	%esi, %eax
	cltd
	idivl	%ebx
	movl	%eax, %ecx
	cmpl	%edi, %eax
	jle	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	subl	%edi, %ecx
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edi
	imulq	%r12, %rdi
	shrq	$45, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SDL_Delay
	jmp	LBB0_4
LBB0_5:
	shll	$2, %esi
	movl	%esi, %eax
	cltd
	idivl	%ebx
	addl	%ecx, %r9d
	cmpl	%eax, %edi
	cmovgel	%r8d, %r9d
	movl	%r9d, _SpeedThrottle.ltime(%rip)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_SpeedThrottle.ltime,4,2 ## @SpeedThrottle.ltime
	.comm	_tfreq,4,2                      ## @tfreq
	.comm	_desiredfps,4,2                 ## @desiredfps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SpeedThrottle                  ; -- Begin function SpeedThrottle
	.p2align	2
_SpeedThrottle:                         ; @SpeedThrottle
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	bl	_SDL_GetTicks
	mov	w20, #10000
	mul	w8, w0, w20
	adrp	x19, _SpeedThrottle.ltime@PAGE
	ldr	w9, [x19, _SpeedThrottle.ltime@PAGEOFF]
Lloh0:
	adrp	x21, _tfreq@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tfreq@GOTPAGEOFF]
	ldr	w12, [x21]
Lloh2:
	adrp	x22, _desiredfps@GOTPAGE
Lloh3:
	ldr	x22, [x22, _desiredfps@GOTPAGEOFF]
	ldr	w13, [x22]
	sdiv	w10, w12, w13
	sub	w11, w8, w9
	cmp	w10, w11
	b.le	LBB0_5
; %bb.1:
	mov	w23, #5977
	movk	w23, #53687, lsl #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_SDL_GetTicks
	mul	w8, w0, w20
	ldr	w9, [x19, _SpeedThrottle.ltime@PAGEOFF]
	ldr	w12, [x21]
	ldr	w13, [x22]
	sdiv	w10, w12, w13
	sub	w11, w8, w9
	cmp	w10, w11
	b.le	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w10, w11
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	umull	x8, w8, w23
	lsr	x0, x8, #45
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_SDL_Delay
	b	LBB0_2
LBB0_5:
	lsl	w12, w12, #2
	sdiv	w12, w12, w13
	add	w9, w10, w9
	cmp	w11, w12
	csel	w8, w9, w8, lt
	str	w8, [x19, _SpeedThrottle.ltime@PAGEOFF]
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_SpeedThrottle.ltime,4,2 ; @SpeedThrottle.ltime
	.comm	_tfreq,4,2                      ; @tfreq
	.comm	_desiredfps,4,2                 ; @desiredfps
.subsections_via_symbols
