	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CG_GetColorForHealth
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x4040800000000000              ## double 33
LCPI0_2:
	.quad	0x403e000000000000              ## double 30
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CG_GetColorForHealth
	.p2align	4, 0x90
_CG_GetColorForHealth:                  ## @CG_GetColorForHealth
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	_ARMOR_PROTECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cvtsi2sd	%eax, %xmm1
	imull	%edi, %eax
	cvtsi2sd	%eax, %xmm2
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm3
	subsd	%xmm1, %xmm3
	divsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %eax
	cmpl	%esi, %eax
	cmovll	%eax, %esi
	addl	%edi, %esi
	movabsq	$4607182418800017408, %rax      ## imm = 0x3FF0000000000000
	movq	%rax, (%rbx)
	movq	%rax, 24(%rbx)
	movapd	%xmm0, %xmm1
	cmpl	$99, %esi
	jg	LBB0_5
## %bb.3:
	cmpl	$66, %esi
	jge	LBB0_4
## %bb.6:
	movq	$0, 16(%rbx)
	movl	$1, %eax
	cmpl	$60, %esi
	jle	LBB0_8
## %bb.7:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	jmp	LBB0_10
LBB0_1:
	movq	%rbx, %rdi
	callq	_VectorClear
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movl	$3, %eax
	jmp	LBB0_10
LBB0_4:
	addl	$-66, %esi
	xorps	%xmm1, %xmm1
	cvtsi2sd	%esi, %xmm1
	divsd	LCPI0_1(%rip), %xmm1
LBB0_5:
	movsd	%xmm1, 16(%rbx)
	movl	$1, %eax
LBB0_10:
	movsd	%xmm0, (%rbx,%rax,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	xorpd	%xmm0, %xmm0
	cmpl	$30, %esi
	jl	LBB0_10
## %bb.9:
	addl	$-30, %esi
	xorps	%xmm0, %xmm0
	cvtsi2sd	%esi, %xmm0
	divsd	LCPI0_2(%rip), %xmm0
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ARMOR_PROTECTION,4,2           ## @ARMOR_PROTECTION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_GetColorForHealth           ; -- Begin function CG_GetColorForHealth
	.p2align	2
_CG_GetColorForHealth:                  ; @CG_GetColorForHealth
	.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
	mov	x19, x2
	cmp	w0, #0
	b.le	LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _ARMOR_PROTECTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARMOR_PROTECTION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w9, w8, w0
	scvtf	d1, w9
	scvtf	d2, w8
	fmov	d0, #1.00000000
	fsub	d2, d0, d2
	fdiv	d1, d1, d2
	fcvtzs	w8, d1
	cmp	w8, w1
	csel	w8, w8, w1, lt
	add	w8, w8, w0
	mov	x9, #4607182418800017408
	str	x9, [x19]
	str	x9, [x19, #24]
	fmov	d1, #1.00000000
	cmp	w8, #99
	b.gt	LBB0_7
; %bb.2:
	subs	w9, w8, #66
	b.ge	LBB0_6
; %bb.3:
	str	xzr, [x19, #16]
	cmp	w8, #60
	b.le	LBB0_10
; %bb.4:
	fmov	d0, #1.00000000
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_VectorClear
	fmov	d0, #1.00000000
	mov	w8, #3
	b	LBB0_9
LBB0_6:
	scvtf	d1, w9
	mov	x8, #140737488355328
	movk	x8, #16448, lsl #48
	fmov	d2, x8
	fdiv	d1, d1, d2
LBB0_7:
	str	d1, [x19, #16]
LBB0_8:
	mov	w8, #1
LBB0_9:
	str	d0, [x19, x8, lsl #3]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	subs	w8, w8, #30
	b.ge	LBB0_12
; %bb.11:
	movi	d0, #0000000000000000
	b	LBB0_8
LBB0_12:
	scvtf	d0, w8
	fmov	d1, #30.00000000
	fdiv	d0, d0, d1
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ARMOR_PROTECTION,4,2           ; @ARMOR_PROTECTION
.subsections_via_symbols
