	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SpeedSampler2Add           ## -- Begin function SDL_SpeedSampler2Add
	.p2align	4, 0x90
_SDL_SpeedSampler2Add:                  ## @SDL_SpeedSampler2Add
	.cfi_startproc
## %bb.0:
	testl	%esi, %esi
	js	LBB0_1
## %bb.2:
	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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	8(%rdi), %r13
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r14
	xorl	%eax, %eax
	callq	_SDL_GetTickHR
	movslq	%eax, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	subq	%r13, %rdi
	callq	_llabs
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	cltq
	cmpq	%rax, %r12
	jle	LBB0_4
## %bb.6:
	movl	%ebx, %ecx
	addq	%rcx, %r14
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, %rcx
	cmpq	%r12, %rcx
	jle	LBB0_7
## %bb.8:
	imulq	%r12, %r14
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:
	movq	%r14, %rax
	cqto
	idivq	%rcx
	movq	%rax, %r14
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	retq
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	%r12, 16(%r15)
	movl	%ebx, %eax
	movq	%rax, 24(%r15)
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	movslq	%eax, %rcx
	movq	%rcx, %rdx
	orq	%r12, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.15:
	movq	%rcx, %rax
	jmp	LBB0_16
LBB0_7:
	movq	%rcx, %r12
	jmp	LBB0_11
LBB0_9:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	%r12, 16(%r15)
	movq	%r14, 24(%r15)
	testq	%r12, %r12
	jle	LBB0_12
## %bb.13:
	imulq	$1000, %r14, %rax               ## imm = 0x3E8
	movq	%rax, %rcx
	orq	%r12, %rcx
	shrq	$32, %rcx
	je	LBB0_14
LBB0_16:
	cqto
	idivq	%r12
	jmp	LBB0_17
LBB0_12:
	movl	32(%r15), %eax
	jmp	LBB0_18
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
LBB0_5:
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_17:
	movl	%eax, 32(%r15)
LBB0_18:
	cltq
	addq	$24, %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_SpeedSampler2Add           ; -- Begin function SDL_SpeedSampler2Add
	.p2align	2
_SDL_SpeedSampler2Add:                  ; @SDL_SpeedSampler2Add
	.cfi_startproc
; %bb.0:
	tbnz	w1, #31, LBB0_5
; %bb.1:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_remember_state
	mov	x20, x1
	mov	x19, x0
	ldp	x21, x25, [x0]
	ldp	x23, x24, [x0, #16]
	bl	_SDL_GetTickHR
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
	sub	x0, x22, x25
	bl	_llabs
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
	sxtw	x9, w0
	cmp	x21, x9
	b.le	LBB0_6
; %bb.3:
	add	x8, x24, w20, uxtw
	add	x9, x23, x9
	cmp	x9, x21
	b.le	LBB0_7
; %bb.4:
	mul	x8, x8, x21
	sdiv	x8, x8, x9
	b	LBB0_8
LBB0_5:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	mov	x0, #0
	ret
LBB0_6:
	.cfi_restore_state
	stp	x22, x21, [x19, #8]
	mov	w8, w20
	str	x8, [x19, #24]
	mov	w8, #1000
	mul	w8, w20, w8
	sxtw	x8, w8
	b	LBB0_10
LBB0_7:
	mov	x21, x9
LBB0_8:
	stp	x22, x21, [x19, #8]
	str	x8, [x19, #24]
	cmp	x21, #0
	b.le	LBB0_11
; %bb.9:
	mov	w9, #1000
	mul	x8, x8, x9
LBB0_10:
	sdiv	x8, x8, x21
	str	w8, [x19, #32]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_12
LBB0_11:
	ldr	w8, [x19, #32]
LBB0_12:
	sxtw	x0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
