	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function PM_Friction
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_PM_Friction:                           ## @PM_Friction
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_pm@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_VectorCopy
	callq	_VectorLength
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_2
## %bb.1:
	movq	$0, (%rbx)
	jmp	LBB0_14
LBB0_2:
	movq	(%r14), %rcx
	movl	(%rcx), %edx
	movq	_pml@GOTPCREL(%rip), %rax
	xorps	%xmm1, %xmm1
	cmpl	$1, %edx
	jg	LBB0_7
## %bb.3:
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.4:
	movq	_SURF_SLICK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, 4(%rax)
	jne	LBB0_7
## %bb.5:
	movq	8(%rcx), %rsi
	movq	_PMF_TIME_KNOCKBACK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	testl	%edi, 8(%rsi)
	jne	LBB0_7
## %bb.6:
	movq	_pm_stopspeed@GOTPCREL(%rip), %rsi
	movss	(%rsi), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm2
	movq	_pm_friction@GOTPCREL(%rip), %rsi
	mulss	(%rsi), %xmm2
	mulss	(%rax), %xmm2
	xorps	%xmm1, %xmm1
	addss	%xmm2, %xmm1
LBB0_7:
	testl	%edx, %edx
	je	LBB0_9
## %bb.8:
	movq	_pm_waterfriction@GOTPCREL(%rip), %rsi
	movss	(%rsi), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	cvtsi2ss	%edx, %xmm3
	mulss	%xmm2, %xmm3
	mulss	(%rax), %xmm3
	addss	%xmm3, %xmm1
LBB0_9:
	movq	8(%rcx), %rcx
	movq	24(%rcx), %rdx
	movq	_PW_FLIGHT@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	$0, (%rdx,%rsi,8)
	je	LBB0_11
## %bb.10:
	movq	_pm_flightfriction@GOTPCREL(%rip), %rdx
	movss	(%rdx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	mulss	(%rax), %xmm2
	addss	%xmm2, %xmm1
LBB0_11:
	movq	16(%rcx), %rcx
	movq	_PM_SPECTATOR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.12:
	movq	_pm_spectatorfriction@GOTPCREL(%rip), %rcx
	movss	(%rcx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	mulss	(%rax), %xmm2
	addss	%xmm2, %xmm1
LBB0_13:
	movaps	%xmm0, %xmm2
	subss	%xmm1, %xmm2
	xorps	%xmm1, %xmm1
	maxss	%xmm2, %xmm1
	divss	%xmm0, %xmm1
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%rbx)
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, 4(%rbx)
	mulss	8(%rbx), %xmm1
	movss	%xmm1, 8(%rbx)
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pm,8,3                         ## @pm
	.comm	_pml,16,3                       ## @pml
	.comm	_SURF_SLICK,4,2                 ## @SURF_SLICK
	.comm	_PMF_TIME_KNOCKBACK,4,2         ## @PMF_TIME_KNOCKBACK
	.comm	_pm_stopspeed,4,2               ## @pm_stopspeed
	.comm	_pm_friction,4,2                ## @pm_friction
	.comm	_pm_waterfriction,4,2           ## @pm_waterfriction
	.comm	_PW_FLIGHT,8,3                  ## @PW_FLIGHT
	.comm	_pm_flightfriction,4,2          ## @pm_flightfriction
	.comm	_PM_SPECTATOR,8,3               ## @PM_SPECTATOR
	.comm	_pm_spectatorfriction,4,2       ## @pm_spectatorfriction
	.no_dead_strip	_PM_Friction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PM_Friction
_PM_Friction:                           ; @PM_Friction
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _pm@GOTPAGE
Lloh1:
	ldr	x20, [x20, _pm@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	x19, [x8]
	mov	x0, x19
	bl	_VectorCopy
	bl	_VectorLength
	fmov	s1, #1.00000000
	fcmp	s0, s1
	b.pl	LBB0_2
; %bb.1:
	str	xzr, [x19]
	b	LBB0_10
LBB0_2:
	ldr	x8, [x20]
	ldr	w10, [x8]
Lloh2:
	adrp	x9, _pml@GOTPAGE
Lloh3:
	ldr	x9, [x9, _pml@GOTPAGEOFF]
	ldr	x11, [x9, #8]
	movi	d1, #0000000000000000
	cmp	w10, #1
	ccmp	x11, #0, #4, le
	b.eq	LBB0_6
; %bb.3:
	ldr	w11, [x9, #4]
Lloh4:
	adrp	x12, _SURF_SLICK@GOTPAGE
Lloh5:
	ldr	x12, [x12, _SURF_SLICK@GOTPAGEOFF]
Lloh6:
	ldr	w12, [x12]
	tst	w12, w11
	b.ne	LBB0_6
; %bb.4:
	ldr	x11, [x8, #8]
	ldr	w11, [x11, #8]
Lloh7:
	adrp	x12, _PMF_TIME_KNOCKBACK@GOTPAGE
Lloh8:
	ldr	x12, [x12, _PMF_TIME_KNOCKBACK@GOTPAGEOFF]
Lloh9:
	ldr	w12, [x12]
	tst	w12, w11
	b.ne	LBB0_6
; %bb.5:
Lloh10:
	adrp	x11, _pm_stopspeed@GOTPAGE
Lloh11:
	ldr	x11, [x11, _pm_stopspeed@GOTPAGEOFF]
Lloh12:
	ldr	s1, [x11]
	fcmp	s0, s1
Lloh13:
	adrp	x11, _pm_friction@GOTPAGE
Lloh14:
	ldr	x11, [x11, _pm_friction@GOTPAGEOFF]
	fcsel	s1, s1, s0, mi
Lloh15:
	ldr	s2, [x11]
	fmul	s1, s2, s1
	ldr	s2, [x9]
	movi	d3, #0000000000000000
	fmadd	s1, s1, s2, s3
LBB0_6:
	cbz	w10, LBB0_8
; %bb.7:
Lloh16:
	adrp	x11, _pm_waterfriction@GOTPAGE
Lloh17:
	ldr	x11, [x11, _pm_waterfriction@GOTPAGEOFF]
Lloh18:
	ldr	s2, [x11]
	fmul	s2, s0, s2
	scvtf	s3, w10
	fmul	s3, s2, s3
	ldr	s2, [x9]
	fmadd	s1, s3, s2, s1
	b	LBB0_9
LBB0_8:
	ldr	s2, [x9]
LBB0_9:
	ldr	x8, [x8, #8]
Lloh19:
	adrp	x9, _PW_FLIGHT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PW_FLIGHT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldp	x8, x10, [x8, #16]
	ldr	x9, [x10, x9, lsl #3]
Lloh22:
	adrp	x10, _pm_flightfriction@GOTPAGE
Lloh23:
	ldr	x10, [x10, _pm_flightfriction@GOTPAGEOFF]
Lloh24:
	ldr	s3, [x10]
	fmul	s3, s0, s3
	fmadd	s3, s3, s2, s1
	cmp	x9, #0
	fcsel	s1, s1, s3, eq
Lloh25:
	adrp	x9, _PM_SPECTATOR@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PM_SPECTATOR@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _pm_spectatorfriction@GOTPAGE
Lloh29:
	ldr	x10, [x10, _pm_spectatorfriction@GOTPAGEOFF]
Lloh30:
	ldr	s3, [x10]
	fmul	s3, s0, s3
	fmadd	s2, s3, s2, s1
	cmp	x8, x9
	fcsel	s1, s2, s1, eq
	fsub	s1, s0, s1
	movi	d2, #0000000000000000
	fmax	s1, s1, s2
	fdiv	s0, s1, s0
	ldr	d1, [x19]
	fmul.2s	v1, v1, v0[0]
	str	d1, [x19]
	ldr	s1, [x19, #8]
	fmul	s0, s1, s0
	str	s0, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_pm,8,3                         ; @pm
	.comm	_pml,16,3                       ; @pml
	.comm	_SURF_SLICK,4,2                 ; @SURF_SLICK
	.comm	_PMF_TIME_KNOCKBACK,4,2         ; @PMF_TIME_KNOCKBACK
	.comm	_pm_stopspeed,4,2               ; @pm_stopspeed
	.comm	_pm_friction,4,2                ; @pm_friction
	.comm	_pm_waterfriction,4,2           ; @pm_waterfriction
	.comm	_PW_FLIGHT,8,3                  ; @PW_FLIGHT
	.comm	_pm_flightfriction,4,2          ; @pm_flightfriction
	.comm	_PM_SPECTATOR,8,3               ; @PM_SPECTATOR
	.comm	_pm_spectatorfriction,4,2       ; @pm_spectatorfriction
	.no_dead_strip	_PM_Friction
.subsections_via_symbols
