	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ST_calcPainOffset              ## -- Begin function ST_calcPainOffset
	.p2align	4, 0x90
_ST_calcPainOffset:                     ## @ST_calcPainOffset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_plyr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	cmpl	$100, %ecx
	movl	$100, %eax
	cmovgel	%eax, %ecx
	cmpl	_ST_calcPainOffset.oldhealth(%rip), %ecx
	jne	LBB0_2
## %bb.1:
	movl	_ST_calcPainOffset.lastcalc(%rip), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_2:
	movq	_ST_FACESTRIDE@GOTPCREL(%rip), %rdx
	subl	%ecx, %eax
	movq	_ST_NUMPAINFACES@GOTPCREL(%rip), %rsi
	imull	(%rsi), %eax
	cltq
	imulq	$680390859, %rax, %rax          ## imm = 0x288DF0CB
	movq	%rax, %rsi
	shrq	$63, %rsi
	sarq	$36, %rax
	addl	%esi, %eax
	imull	(%rdx), %eax
	movl	%eax, _ST_calcPainOffset.lastcalc(%rip)
	movl	%ecx, _ST_calcPainOffset.oldhealth(%rip)
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ST_calcPainOffset.lastcalc,4,2 ## @ST_calcPainOffset.lastcalc
	.section	__DATA,__data
	.p2align	2                               ## @ST_calcPainOffset.oldhealth
_ST_calcPainOffset.oldhealth:
	.long	4294967295                      ## 0xffffffff

	.comm	_plyr,8,3                       ## @plyr
	.comm	_ST_FACESTRIDE,4,2              ## @ST_FACESTRIDE
	.comm	_ST_NUMPAINFACES,4,2            ## @ST_NUMPAINFACES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ST_calcPainOffset              ; -- Begin function ST_calcPainOffset
	.p2align	2
_ST_calcPainOffset:                     ; @ST_calcPainOffset
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _plyr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _plyr@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
	mov	w10, #100
	cmp	w8, #100
	csel	w8, w8, w10, lt
	adrp	x9, _ST_calcPainOffset.oldhealth@PAGE
	ldr	w11, [x9, _ST_calcPainOffset.oldhealth@PAGEOFF]
	cmp	w8, w11
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ST_calcPainOffset.lastcalc@PAGE
Lloh4:
	ldr	w0, [x8, _ST_calcPainOffset.lastcalc@PAGEOFF]
	ret
LBB0_2:
Lloh5:
	adrp	x11, _ST_FACESTRIDE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _ST_FACESTRIDE@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
Lloh8:
	adrp	x12, _ST_NUMPAINFACES@GOTPAGE
Lloh9:
	ldr	x12, [x12, _ST_NUMPAINFACES@GOTPAGEOFF]
	sub	w10, w10, w8
Lloh10:
	ldr	w12, [x12]
	mul	w10, w12, w10
	mov	w12, #61643
	movk	w12, #10381, lsl #16
	smull	x10, w10, w12
	lsr	x12, x10, #63
	asr	x10, x10, #36
	add	w10, w10, w12
	mul	w0, w10, w11
	adrp	x10, _ST_calcPainOffset.lastcalc@PAGE
	str	w0, [x10, _ST_calcPainOffset.lastcalc@PAGEOFF]
	str	w8, [x9, _ST_calcPainOffset.oldhealth@PAGEOFF]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ST_calcPainOffset.lastcalc,4,2 ; @ST_calcPainOffset.lastcalc
	.section	__DATA,__data
	.p2align	2                               ; @ST_calcPainOffset.oldhealth
_ST_calcPainOffset.oldhealth:
	.long	4294967295                      ; 0xffffffff

	.comm	_plyr,8,3                       ; @plyr
	.comm	_ST_FACESTRIDE,4,2              ; @ST_FACESTRIDE
	.comm	_ST_NUMPAINFACES,4,2            ; @ST_NUMPAINFACES
.subsections_via_symbols
