local L0_1, L1_1, L2_1, L3_1, L4_1, L5_1, L6_1, L7_1, L8_1, L9_1, L10_1, L11_1, L12_1, L13_1, L14_1, L15_1, L16_1, L17_1, L18_1, L19_1, L20_1, L21_1, L22_1, L23_1
L0_1 = require
L1_1 = "Utilities.Utils"
L0_1(L1_1)
L0_1 = G
L0_1 = L0_1.StaticClass
L1_1 = "RelicUtils"
L0_1 = L0_1(L1_1)
L1_1 = CS
L1_1 = L1_1.RPG
L1_1 = L1_1.Client
L1_1 = L1_1.AvatarModule
L2_1 = CS
L2_1 = L2_1.RPG
L2_1 = L2_1.GameCore
L2_1 = L2_1.RelicExpTypeExcelTable
L3_1 = CS
L3_1 = L3_1.RPG
L3_1 = L3_1.GameCore
L3_1 = L3_1.ConstValueCommonExcelTable
L4_1 = CS
L4_1 = L4_1.RPG
L4_1 = L4_1.GameCore
L4_1 = L4_1.RelicDataInfoExcelTable
L5_1 = CS
L5_1 = L5_1.RPG
L5_1 = L5_1.GameCore
L5_1 = L5_1.RelicSetConfigExcelTable
L6_1 = 404
L7_1 = 4010131
L0_1.RELIC_TYPE_LOCK_IMG_PATH = "SpriteOutput/ItemIcon/Frame/IconLock_B.png"
L8_1 = {}
L9_1 = CS
L9_1 = L9_1.RPG
L9_1 = L9_1.GameCore
L9_1 = L9_1.InventorySortType
L9_1 = L9_1.Rarity
L10_1 = CS
L10_1 = L10_1.RPG
L10_1 = L10_1.GameCore
L10_1 = L10_1.InventorySortType
L10_1 = L10_1.Level
L11_1 = CS
L11_1 = L11_1.RPG
L11_1 = L11_1.GameCore
L11_1 = L11_1.InventorySortType
L11_1 = L11_1.ObtainTime
L12_1 = CS
L12_1 = L12_1.RPG
L12_1 = L12_1.GameCore
L12_1 = L12_1.InventorySortType
L12_1 = L12_1.HPAddedRatio
L13_1 = CS
L13_1 = L13_1.RPG
L13_1 = L13_1.GameCore
L13_1 = L13_1.InventorySortType
L13_1 = L13_1.HPDelta
L14_1 = CS
L14_1 = L14_1.RPG
L14_1 = L14_1.GameCore
L14_1 = L14_1.InventorySortType
L14_1 = L14_1.AttackAddedRatio
L15_1 = CS
L15_1 = L15_1.RPG
L15_1 = L15_1.GameCore
L15_1 = L15_1.InventorySortType
L15_1 = L15_1.AttackDelta
L16_1 = CS
L16_1 = L16_1.RPG
L16_1 = L16_1.GameCore
L16_1 = L16_1.InventorySortType
L16_1 = L16_1.DefenceAddedRatio
L17_1 = CS
L17_1 = L17_1.RPG
L17_1 = L17_1.GameCore
L17_1 = L17_1.InventorySortType
L17_1 = L17_1.DefenceDelta
L18_1 = CS
L18_1 = L18_1.RPG
L18_1 = L18_1.GameCore
L18_1 = L18_1.InventorySortType
L18_1 = L18_1.SpeedBase
L19_1 = CS
L19_1 = L19_1.RPG
L19_1 = L19_1.GameCore
L19_1 = L19_1.InventorySortType
L19_1 = L19_1.CriticalChance
L20_1 = CS
L20_1 = L20_1.RPG
L20_1 = L20_1.GameCore
L20_1 = L20_1.InventorySortType
L20_1 = L20_1.CriticalDamage
L21_1 = CS
L21_1 = L21_1.RPG
L21_1 = L21_1.GameCore
L21_1 = L21_1.InventorySortType
L21_1 = L21_1.StatusProbability
L22_1 = CS
L22_1 = L22_1.RPG
L22_1 = L22_1.GameCore
L22_1 = L22_1.InventorySortType
L22_1 = L22_1.StatusResistance
L23_1 = CS
L23_1 = L23_1.RPG
L23_1 = L23_1.GameCore
L23_1 = L23_1.InventorySortType
L23_1 = L23_1.BreakDamageAddedRatio
L8_1[1] = L9_1
L8_1[2] = L10_1
L8_1[3] = L11_1
L8_1[4] = L12_1
L8_1[5] = L13_1
L8_1[6] = L14_1
L8_1[7] = L15_1
L8_1[8] = L16_1
L8_1[9] = L17_1
L8_1[10] = L18_1
L8_1[11] = L19_1
L8_1[12] = L20_1
L8_1[13] = L21_1
L8_1[14] = L22_1
L8_1[15] = L23_1
L0_1.supported_sort_type = L8_1
L8_1 = {}
L9_1 = CS
L9_1 = L9_1.RPG
L9_1 = L9_1.GameCore
L9_1 = L9_1.InventorySortType
L9_1 = L9_1.Rarity
L10_1 = CS
L10_1 = L10_1.RPG
L10_1 = L10_1.GameCore
L10_1 = L10_1.InventorySortType
L10_1 = L10_1.Level
L11_1 = CS
L11_1 = L11_1.RPG
L11_1 = L11_1.GameCore
L11_1 = L11_1.InventorySortType
L11_1 = L11_1.ObtainTime
L8_1[1] = L9_1
L8_1[2] = L10_1
L8_1[3] = L11_1
L0_1.primary_sort_type = L8_1
L8_1 = {}
L9_1 = CS
L9_1 = L9_1.RPG
L9_1 = L9_1.GameCore
L9_1 = L9_1.InventorySortType
L9_1 = L9_1.HPAddedRatio
L10_1 = CS
L10_1 = L10_1.RPG
L10_1 = L10_1.GameCore
L10_1 = L10_1.InventorySortType
L10_1 = L10_1.HPDelta
L11_1 = CS
L11_1 = L11_1.RPG
L11_1 = L11_1.GameCore
L11_1 = L11_1.InventorySortType
L11_1 = L11_1.AttackAddedRatio
L12_1 = CS
L12_1 = L12_1.RPG
L12_1 = L12_1.GameCore
L12_1 = L12_1.InventorySortType
L12_1 = L12_1.AttackDelta
L13_1 = CS
L13_1 = L13_1.RPG
L13_1 = L13_1.GameCore
L13_1 = L13_1.InventorySortType
L13_1 = L13_1.DefenceAddedRatio
L14_1 = CS
L14_1 = L14_1.RPG
L14_1 = L14_1.GameCore
L14_1 = L14_1.InventorySortType
L14_1 = L14_1.DefenceDelta
L15_1 = CS
L15_1 = L15_1.RPG
L15_1 = L15_1.GameCore
L15_1 = L15_1.InventorySortType
L15_1 = L15_1.SpeedBase
L16_1 = CS
L16_1 = L16_1.RPG
L16_1 = L16_1.GameCore
L16_1 = L16_1.InventorySortType
L16_1 = L16_1.CriticalChance
L17_1 = CS
L17_1 = L17_1.RPG
L17_1 = L17_1.GameCore
L17_1 = L17_1.InventorySortType
L17_1 = L17_1.CriticalDamage
L18_1 = CS
L18_1 = L18_1.RPG
L18_1 = L18_1.GameCore
L18_1 = L18_1.InventorySortType
L18_1 = L18_1.StatusProbability
L19_1 = CS
L19_1 = L19_1.RPG
L19_1 = L19_1.GameCore
L19_1 = L19_1.InventorySortType
L19_1 = L19_1.StatusResistance
L20_1 = CS
L20_1 = L20_1.RPG
L20_1 = L20_1.GameCore
L20_1 = L20_1.InventorySortType
L20_1 = L20_1.BreakDamageAddedRatio
L8_1[1] = L9_1
L8_1[2] = L10_1
L8_1[3] = L11_1
L8_1[4] = L12_1
L8_1[5] = L13_1
L8_1[6] = L14_1
L8_1[7] = L15_1
L8_1[8] = L16_1
L8_1[9] = L17_1
L8_1[10] = L18_1
L8_1[11] = L19_1
L8_1[12] = L20_1
L0_1.secondary_sort_type = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2
  L1_2 = {}
  if A0_2 == nil then
    return L1_2
  end
  L2_2 = pairs
  L3_2 = CS
  L3_2 = L3_2.RPG
  L3_2 = L3_2.GameCore
  L3_2 = L3_2.AvatarPropertyExcelTable
  L3_2 = L3_2.dataDict
  L2_2, L3_2, L4_2 = L2_2(L3_2)
  for L5_2, L6_2 in L2_2, L3_2, L4_2 do
    L8_2 = A0_2
    L7_2 = A0_2.GetPropertyValue
    L9_2 = L6_2.PropertyType
    L7_2 = L7_2(L8_2, L9_2)
    if L7_2 ~= 0 then
      L8_2 = L6_2.PropertyType
      L1_2[L8_2] = L7_2
    end
  end
  return L1_2
end
L0_1.get_all_properties = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2
  L2_2 = {}
  L3_2 = A0_2.MainAffixPropertyType
  L2_2.PropertyType = L3_2
  L4_2 = A0_2
  L3_2 = A0_2.GetMainAffixPropertyValue
  L3_2 = L3_2(L4_2)
  L2_2.CurNum = L3_2
  if A1_2 ~= nil then
    L4_2 = A0_2.Level
    if A1_2 ~= L4_2 then
      L5_2 = A0_2
      L4_2 = A0_2.CalculatePropertyValue
      L6_2 = L2_2.PropertyType
      L7_2 = A1_2
      L4_2 = L4_2(L5_2, L6_2, L7_2)
      L3_2 = L4_2
      L2_2.NextNum = L3_2
    end
  end
  return L2_2
end
L0_1.get_main_affix_property = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2
  L1_2 = {}
  L2_2 = A0_2.SubAffixPropertyTypeArray
  L3_2 = 0
  L4_2 = L2_2.Length
  L4_2 = L4_2 - 1
  L5_2 = 1
  for L6_2 = L3_2, L4_2, L5_2 do
    L7_2 = L2_2[L6_2]
    L9_2 = A0_2
    L8_2 = A0_2.GetPropertyValue
    L10_2 = L7_2
    L8_2 = L8_2(L9_2, L10_2)
    L9_2 = CS
    L9_2 = L9_2.RPG
    L9_2 = L9_2.GameCore
    L9_2 = L9_2.AvatarPropertyExcelTable
    L9_2 = L9_2.GetData
    L10_2 = L7_2
    L9_2 = L9_2(L10_2)
    L10_2 = {}
    L11_2 = L9_2.PropertyNameRelic
    L10_2.Title = L11_2
    L11_2 = L9_2.IconPath
    L10_2.IconPath = L11_2
    L11_2 = L1_1.FormatDisplayDataByType
    L12_2 = L7_2
    L13_2 = L8_2
    L11_2 = L11_2(L12_2, L13_2)
    L10_2.Num = L11_2
    L10_2.BonusCnt = 0
    L11_2 = A0_2.SubAffixBonusRecord
    if L11_2 ~= nil then
      L11_2 = A0_2.SubAffixBonusRecord
      L12_2 = L11_2
      L11_2 = L11_2.ContainsKey
      L13_2 = L7_2
      L11_2 = L11_2(L12_2, L13_2)
      if L11_2 then
        L11_2 = A0_2.SubAffixBonusRecord
        L11_2 = L11_2[L7_2]
        L10_2.BonusCnt = L11_2
      end
    end
    L11_2 = table
    L11_2 = L11_2.insert
    L12_2 = L1_2
    L13_2 = #L1_2
    L13_2 = L13_2 + 1
    L14_2 = L10_2
    L11_2(L12_2, L13_2, L14_2)
  end
  return L1_2
end
L0_1.get_sub_affix_properties = L8_1
function L8_1(A0_2)
  local L1_2, L2_2
  L1_2 = CS
  L1_2 = L1_2.RPG
  L1_2 = L1_2.GameCore
  L1_2 = L1_2.RelicBaseTypeExcelTable
  L1_2 = L1_2.GetData
  L2_2 = A0_2
  L1_2 = L1_2(L2_2)
  L2_2 = L1_2.BaseTypeText
  return L2_2
end
L0_1.get_textid_by_type = L8_1
function L8_1(A0_2)
  local L1_2
  if A0_2 then
    L1_2 = "UIText_RelicType_2Set"
    if L1_2 then
      goto lbl_7
    end
  end
  L1_2 = "UIText_RelicType_4Set"
  ::lbl_7::
  return L1_2
end
L0_1.get_relic_title_textid = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2
  if A1_2 ~= nil then
    L2_2 = A1_2.Count
    if L2_2 ~= 0 then
      goto lbl_8
    end
  end
  L2_2 = 0
  do return L2_2 end
  ::lbl_8::
  L2_2 = 0
  L3_2 = 0
  L4_2 = A1_2.Count
  L4_2 = L4_2 - 1
  L5_2 = 1
  for L6_2 = L3_2, L4_2, L5_2 do
    L7_2 = A1_2[L6_2]
    L8_2 = L7_2.RelicRow
    L8_2 = L8_2.SetID
    if L8_2 == A0_2 then
      L2_2 = L2_2 + 1
    end
  end
  return L2_2
end
L0_1.count_set_skill_id = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2
  L1_2 = {}
  if A0_2 ~= nil then
    L2_2 = A0_2.Count
    if L2_2 ~= 0 then
      goto lbl_8
    end
  end
  do return L1_2 end
  ::lbl_8::
  L2_2 = 0
  L3_2 = A0_2.Count
  L3_2 = L3_2 - 1
  L4_2 = 1
  for L5_2 = L2_2, L3_2, L4_2 do
    L6_2 = A0_2[L5_2]
    L7_2 = L6_2.RelicRow
    L7_2 = L7_2.SetID
    L7_2 = L1_2[L7_2]
    if L7_2 == nil then
      L7_2 = L6_2.RelicRow
      L7_2 = L7_2.SetID
      L1_2[L7_2] = 1
    else
      L7_2 = L6_2.RelicRow
      L7_2 = L7_2.SetID
      L8_2 = L6_2.RelicRow
      L8_2 = L8_2.SetID
      L8_2 = L1_2[L8_2]
      L8_2 = L8_2 + 1
      L1_2[L7_2] = L8_2
    end
  end
  L2_2 = {}
  L3_2 = pairs
  L4_2 = L1_2
  L3_2, L4_2, L5_2 = L3_2(L4_2)
  for L6_2, L7_2 in L3_2, L4_2, L5_2 do
    L8_2 = {}
    L8_2.ID = L6_2
    L8_2.Count = L7_2
    L9_2 = table
    L9_2 = L9_2.insert
    L10_2 = L2_2
    L11_2 = #L2_2
    L11_2 = L11_2 + 1
    L12_2 = L8_2
    L9_2(L10_2, L11_2, L12_2)
  end
  return L2_2
end
L0_1.get_distinct_set_skill_id_data = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2
  L1_2 = {}
  if A0_2 ~= nil then
    L2_2 = A0_2.Count
    if L2_2 ~= 0 then
      goto lbl_8
    end
  end
  do return L1_2 end
  ::lbl_8::
  L2_2 = 0
  L3_2 = A0_2.Count
  L3_2 = L3_2 - 1
  L4_2 = 1
  for L5_2 = L2_2, L3_2, L4_2 do
    L6_2 = A0_2[L5_2]
    L7_2 = L6_2.RelicRow
    L7_2 = L7_2.SetID
    L7_2 = L1_2[L7_2]
    if L7_2 == nil then
      L7_2 = L6_2.RelicRow
      L7_2 = L7_2.SetID
      L1_2[L7_2] = 1
    else
      L7_2 = L6_2.RelicRow
      L7_2 = L7_2.SetID
      L8_2 = L6_2.RelicRow
      L8_2 = L8_2.SetID
      L8_2 = L1_2[L8_2]
      L8_2 = L8_2 + 1
      L1_2[L7_2] = L8_2
    end
  end
  L2_2 = {}
  L3_2 = pairs
  L4_2 = L1_2
  L3_2, L4_2, L5_2 = L3_2(L4_2)
  for L6_2, L7_2 in L3_2, L4_2, L5_2 do
    L8_2 = CS
    L8_2 = L8_2.RPG
    L8_2 = L8_2.GameCore
    L8_2 = L8_2.RelicSetConfigExcelTable
    L8_2 = L8_2.GetData
    L9_2 = L6_2
    L8_2 = L8_2(L9_2)
    L9_2 = L8_2.SetSkillList
    L9_2 = L9_2[0]
    if L7_2 >= L9_2 then
      L9_2 = {}
      L9_2.ID = L6_2
      L9_2.Count = L7_2
      L9_2.Row = L8_2
      L10_2 = #L2_2
      L10_2 = L10_2 + 1
      L2_2[L10_2] = L9_2
    end
  end
  L3_2 = table
  L3_2 = L3_2.sort
  L4_2 = L2_2
  function L5_2(A0_3, A1_3)
    local L2_3, L3_3
    if A0_3 == A1_3 then
      L2_3 = false
      return L2_3
    end
    L2_3 = A0_3.Row
    L2_3 = L2_3.IsPlanarSuit
    L3_3 = A1_3.Row
    L3_3 = L3_3.IsPlanarSuit
    L2_3 = A0_3.Row
    L2_3 = L2_3 ~= L3_3 and L2_3
    return L2_3
  end
  L3_2(L4_2, L5_2)
  return L2_2
end
L0_1.get_active_set_skill_id_data = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2
  if A1_2 == nil then
    L2_2 = nil
    return L2_2
  end
  L3_2 = A1_2
  L2_2 = A1_2.GetRelicList
  L2_2 = L2_2(L3_2)
  L3_2 = L0_1.get_relic_from
  L4_2 = A0_2
  L5_2 = L2_2
  return L3_2(L4_2, L5_2)
end
L0_1.get_relic_from_avatar = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2
  if A1_2 ~= nil then
    L2_2 = A1_2.Count
    if L2_2 ~= 0 then
      goto lbl_8
    end
  end
  L2_2 = nil
  do return L2_2 end
  ::lbl_8::
  L2_2 = 0
  L3_2 = A1_2.Count
  L3_2 = L3_2 - 1
  L4_2 = 1
  for L5_2 = L2_2, L3_2, L4_2 do
    L6_2 = A1_2[L5_2]
    L7_2 = L6_2.RelicRow
    L7_2 = L7_2.Type
    if L7_2 == A0_2 then
      return L6_2
    end
  end
  L2_2 = nil
  return L2_2
end
L0_1.get_relic_from = L8_1
function L8_1()
  local L0_2, L1_2, L2_2
  L0_2 = L3_1.GetData
  L1_2 = "Relic_Bonus_Level"
  L0_2 = L0_2(L1_2)
  L0_2 = L0_2.Value
  L1_2 = L0_2.ArrayValue
  L2_2 = L1_2[0]
  L2_2 = L2_2.IntValue
  return L2_2
end
L0_1.get_bonus_level = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2
  L1_2 = L3_1.GetData
  L2_2 = "Relic_Bonus_Level"
  L1_2 = L1_2(L2_2)
  L1_2 = L1_2.Value
  L2_2 = L1_2.ArrayValue
  L3_2 = 0
  L4_2 = L2_2.Length
  L4_2 = L4_2 - 1
  L5_2 = 1
  for L6_2 = L3_2, L4_2, L5_2 do
    L7_2 = L2_2[L6_2]
    L7_2 = L7_2.IntValue
    if A0_2 < L7_2 then
      return L7_2
    end
  end
  return A0_2
end
L0_1.get_next_bonus_level = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2
  L2_2 = A0_2.IsPile
  if L2_2 then
    L2_2 = CS
    L2_2 = L2_2.RPG
    L2_2 = L2_2.GameCore
    L2_2 = L2_2.RelicExpItemExcelTable
    L2_2 = L2_2.GetData
    L3_2 = A0_2.ConfigID
    L2_2 = L2_2(L3_2)
    L3_2 = L2_2.ExpProvide
    L3_2 = L3_2 * A1_2
    return L3_2
  end
  L2_2 = 0
  L3_2 = 0
  L4_2 = A0_2.RelicRow
  L4_2 = L4_2.ExpType
  while true do
    L5_2 = A0_2.Level
    if not (L2_2 < L5_2) then
      break
    end
    L5_2 = L2_1.GetData
    L6_2 = L4_2
    L7_2 = L2_2
    L5_2 = L5_2(L6_2, L7_2)
    L5_2 = L5_2.Exp
    L3_2 = L3_2 + L5_2
    L2_2 = L2_2 + 1
  end
  L5_2 = A0_2.CurrentExp
  L5_2 = L3_2 + L5_2
  L6_2 = L3_1.GetData
  L7_2 = "Relic_Exp_ConversionRate"
  L6_2 = L6_2(L7_2)
  L6_2 = L6_2.Value
  L6_2 = L6_2.IntValue
  L6_2 = L6_2 / 100
  L3_2 = L5_2 * L6_2
  L5_2 = A0_2.RelicRow
  L5_2 = L5_2.ExpProvide
  L3_2 = L3_2 + L5_2
  L5_2 = math
  L5_2 = L5_2.floor
  L6_2 = L3_2
  return L5_2(L6_2)
end
L0_1.calculate_exp_provide = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2
  L1_2 = {}
  L2_2 = L5_1.GetData
  L3_2 = A0_2
  L2_2 = L2_2(L3_2)
  L2_2 = L2_2.IsPlanarSuit
  if L2_2 then
    L3_2 = 5
    if L3_2 then
      goto lbl_12
    end
  end
  L3_2 = 1
  ::lbl_12::
  if L2_2 then
    L4_2 = 6
    if L4_2 then
      goto lbl_18
    end
  end
  L4_2 = 4
  ::lbl_18::
  L5_2 = L3_2
  L6_2 = L4_2
  L7_2 = 1
  for L8_2 = L5_2, L6_2, L7_2 do
    L9_2 = G
    L9_2 = L9_2.Utils
    L9_2 = L9_2.enum_from_int_str
    L10_2 = CS
    L10_2 = L10_2.RPG
    L10_2 = L10_2.GameCore
    L10_2 = L10_2.RelicType
    L11_2 = L8_2
    L9_2 = L9_2(L10_2, L11_2)
    L10_2 = L4_1.GetData
    L11_2 = A0_2
    L12_2 = L9_2
    L10_2 = L10_2(L11_2, L12_2)
    L11_2 = #L1_2
    L11_2 = L11_2 + 1
    L12_2 = G
    L12_2 = L12_2.TextmapStatic
    L12_2 = L12_2.GetText
    L13_2 = L10_2.RelicName
    L12_2 = L12_2(L13_2)
    L1_2[L11_2] = L12_2
  end
  return L1_2
end
L0_1.get_all_name_by_set_id = L8_1
function L8_1()
  local L0_2, L1_2
  L0_2 = CS
  L0_2 = L0_2.RPG
  L0_2 = L0_2.Client
  L0_2 = L0_2.SystemOpenModule
  L0_2 = L0_2.IsOpen
  L1_2 = L6_1
  return L0_2(L1_2)
end
L0_1.is_relic_two_set_unlock = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2
  L1_2 = {}
  L2_2 = table
  L2_2 = L2_2.insert
  L3_2 = L1_2
  L4_2 = CS
  L4_2 = L4_2.RPG
  L4_2 = L4_2.GameCore
  L4_2 = L4_2.ItemMainType
  L4_2 = L4_2.Relic
  L2_2(L3_2, L4_2)
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.Client
  L2_2 = L2_2.GlobalVars
  L2_2 = L2_2.s_ModuleManager
  L2_2 = L2_2.InventoryModule
  L3_2 = L2_2
  L2_2 = L2_2.GetItemsByMainTypes
  L4_2 = L1_2
  L2_2 = L2_2(L3_2, L4_2)
  if A0_2 then
    L3_2 = {}
    L4_2 = 0
    L5_2 = L2_2.Count
    L5_2 = L5_2 - 1
    L6_2 = 1
    for L7_2 = L4_2, L5_2, L6_2 do
      L8_2 = L0_1.is_relic_type_unlock
      L9_2 = L2_2[L7_2]
      L9_2 = L9_2.RelicRow
      L9_2 = L9_2.Type
      L8_2 = L8_2(L9_2)
      if L8_2 then
        L8_2 = #L3_2
        L8_2 = L8_2 + 1
        L9_2 = L2_2[L7_2]
        L3_2[L8_2] = L9_2
      end
    end
    return L3_2
  else
    L3_2 = G
    L3_2 = L3_2.Utils
    L3_2 = L3_2.create_lua_table_from_cs_list
    L4_2 = L2_2
    return L3_2(L4_2)
  end
end
L0_1.get_all_relic_items = L8_1
function L8_1(A0_2)
  local L1_2
  L1_2 = #A0_2
  L1_2 = 4 < L1_2
  return L1_2
end
L0_1.is_planar_suit = L8_1
function L8_1(A0_2)
  local L1_2, L2_2
  L1_2 = L0_1.is_planar_suit
  L2_2 = A0_2
  L1_2 = L1_2(L2_2)
  if not L1_2 then
    L1_2 = true
    return L1_2
  end
  L1_2 = L0_1.is_relic_two_set_unlock
  return L1_2()
end
L0_1.is_relic_type_unlock = L8_1
function L8_1()
  local L0_2, L1_2, L2_2, L3_2, L4_2
  L0_2 = CS
  L0_2 = L0_2.RPG
  L0_2 = L0_2.Client
  L0_2 = L0_2.GlobalVars
  L0_2 = L0_2.s_ModuleManager
  L0_2 = L0_2.MissionModule
  L1_2 = L0_2
  L0_2 = L0_2.GetMainMissionRow
  L2_2 = L7_1
  L0_2 = L0_2(L1_2, L2_2)
  L1_2 = G
  L1_2 = L1_2.TextmapStatic
  L1_2 = L1_2.GetText
  L2_2 = "UIText_Relic_Toast_TwoSet_Lock"
  L3_2 = L0_2.Name
  L1_2 = L1_2(L2_2, L3_2)
  L2_2 = G
  L2_2 = L2_2.NotifyManager
  L2_2 = L2_2.notify
  L3_2 = G
  L3_2 = L3_2.CS
  L3_2 = L3_2.NotifyType
  L3_2 = L3_2.UIPileToastMessageString
  L4_2 = L1_2
  L2_2(L3_2, L4_2)
end
L0_1.show_relic_type_lock_hint = L8_1
function L8_1(A0_2)
  local L1_2
  L1_2 = A0_2.RelicsData
  L1_2 = L1_2.RelicItems
  L1_2 = L1_2.Count
  L1_2 = L1_2 == 0
  return L1_2
end
L0_1.is_dress_empty = L8_1
function L8_1(A0_2)
  local L1_2, L2_2
  L1_2 = A0_2.RelicsData
  L1_2 = L1_2.RelicItems
  L1_2 = L1_2.Count
  L2_2 = L0_1.is_relic_two_set_unlock
  L2_2 = L2_2()
  if L2_2 then
    L2_2 = 6 <= L1_2
    return L2_2
  else
    L2_2 = 4 <= L1_2
    return L2_2
  end
end
L0_1.is_dress_full = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2
  L2_2 = {}
  L3_2 = A1_2
  L2_2[1] = L3_2
  L3_2 = CS
  L3_2 = L3_2.RPG
  L3_2 = L3_2.Client
  L3_2 = L3_2.NetworkManager
  L3_2 = L3_2.FFOMLPONIFB
  L4_2 = L3_2
  L3_2 = L3_2.NJMEDOAFLIM
  L5_2 = A0_2
  L6_2 = L2_2
  L3_2(L4_2, L5_2, L6_2)
end
L0_1.do_dress_relic = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2
  L2_2 = {}
  L3_2 = A1_2
  L2_2[1] = L3_2
  L3_2 = CS
  L3_2 = L3_2.RPG
  L3_2 = L3_2.Client
  L3_2 = L3_2.NetworkManager
  L3_2 = L3_2.FFOMLPONIFB
  L4_2 = L3_2
  L3_2 = L3_2.IDJHDEPGNME
  L5_2 = A0_2
  L6_2 = L2_2
  L3_2(L4_2, L5_2, L6_2)
end
L0_1.do_take_off_relic = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2, L15_2, L16_2, L17_2, L18_2, L19_2
  L1_2 = L0_1.get_all_relic_items
  L2_2 = true
  L1_2 = L1_2(L2_2)
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.GameCore
  L2_2 = L2_2.AvatarRelicRecommendExcelTable
  L2_2 = L2_2.GetData
  L3_2 = A0_2.RealID
  L2_2 = L2_2(L3_2)
  L3_2 = L0_1._get_recommend_set4_id
  L4_2 = A0_2
  L5_2 = L2_2
  L6_2 = L1_2
  L3_2 = L3_2(L4_2, L5_2, L6_2)
  L4_2 = L0_1._get_recommend_set2_id
  L5_2 = A0_2
  L6_2 = L2_2
  L7_2 = L1_2
  L4_2 = L4_2(L5_2, L6_2, L7_2)
  L5_2 = {}
  L6_2 = {}
  L8_2 = A0_2
  L7_2 = A0_2.GetRelicList
  L7_2 = L7_2(L8_2)
  L8_2 = 0
  L9_2 = L7_2.Count
  L9_2 = L9_2 - 1
  L10_2 = 1
  for L11_2 = L8_2, L9_2, L10_2 do
    L12_2 = L7_2[L11_2]
    L13_2 = L12_2.RelicRow
    L13_2 = L13_2.Type
    L5_2[L13_2] = true
  end
  L8_2 = L0_1.is_relic_two_set_unlock
  L8_2 = L8_2()
  if L8_2 then
    L8_2 = 6
    if L8_2 then
      goto lbl_43
    end
  end
  L8_2 = 4
  ::lbl_43::
  L9_2 = 1
  L10_2 = L8_2
  L11_2 = 1
  for L12_2 = L9_2, L10_2, L11_2 do
    L13_2 = G
    L13_2 = L13_2.Utils
    L13_2 = L13_2.enum_from_int_str
    L14_2 = CS
    L14_2 = L14_2.RPG
    L14_2 = L14_2.GameCore
    L14_2 = L14_2.RelicType
    L15_2 = L12_2
    L13_2 = L13_2(L14_2, L15_2)
    L14_2 = L5_2[L13_2]
    if L14_2 == nil then
      L14_2 = L0_1._try_get_dress_relic
      L15_2 = L13_2
      L16_2 = L0_1._get_recommend_property
      L17_2 = L2_2
      L18_2 = L13_2
      L16_2 = L16_2(L17_2, L18_2)
      L17_2 = L3_2
      L18_2 = L4_2
      L19_2 = L1_2
      L14_2 = L14_2(L15_2, L16_2, L17_2, L18_2, L19_2)
      if L14_2 ~= nil then
        L15_2 = #L6_2
        L15_2 = L15_2 + 1
        L6_2[L15_2] = L14_2
      end
    end
  end
  L9_2 = #L6_2
  if L9_2 == 0 then
    L9_2 = false
    return L9_2
  end
  L9_2 = CS
  L9_2 = L9_2.RPG
  L9_2 = L9_2.Client
  L9_2 = L9_2.NetworkManager
  L9_2 = L9_2.FFOMLPONIFB
  L10_2 = L9_2
  L9_2 = L9_2.NJMEDOAFLIM
  L11_2 = A0_2.RealID
  L12_2 = L6_2
  L9_2(L10_2, L11_2, L12_2)
  L9_2 = true
  return L9_2
end
L0_1.do_quick_dress_all_relic = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2
  if A0_2 ~= nil then
    L2_2 = A0_2.PropertyList
    if L2_2 ~= nil then
      goto lbl_8
    end
  end
  L2_2 = nil
  do return L2_2 end
  ::lbl_8::
  L2_2 = 0
  L3_2 = A0_2.PropertyList
  L3_2 = L3_2.Length
  L3_2 = L3_2 - 1
  L4_2 = 1
  for L5_2 = L2_2, L3_2, L4_2 do
    L6_2 = A0_2.PropertyList
    L6_2 = L6_2[L5_2]
    L7_2 = L6_2.RelicType
    if L7_2 == A1_2 then
      L7_2 = L6_2.PropertyType
      return L7_2
    end
  end
  L2_2 = nil
  return L2_2
end
L0_1._get_recommend_property = L8_1
function L8_1(A0_2, A1_2, A2_2, A3_2, A4_2)
  local L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2, L15_2, L16_2
  L5_2 = nil
  L6_2 = ipairs
  L7_2 = A4_2
  L6_2, L7_2, L8_2 = L6_2(L7_2)
  for L9_2, L10_2 in L6_2, L7_2, L8_2 do
    L11_2 = L10_2.RelicRow
    L11_2 = L11_2.Type
    if L11_2 == A0_2 then
      L11_2 = L10_2.BelongAvatarID
      if L11_2 == 0 then
        L11_2 = L0_1._match
        L12_2 = L5_2
        L13_2 = L10_2
        L14_2 = A1_2
        L15_2 = A2_2
        L16_2 = A3_2
        L11_2 = L11_2(L12_2, L13_2, L14_2, L15_2, L16_2)
        L5_2 = L11_2
      end
    end
  end
  return L5_2
end
L0_1._try_get_dress_relic = L8_1
function L8_1(A0_2, A1_2, A2_2, A3_2, A4_2)
  local L5_2, L6_2, L7_2, L8_2, L9_2
  if A0_2 == nil then
    return A1_2
  end
  L5_2 = A0_2.RelicRow
  L5_2 = L5_2.SetID
  L6_2 = A1_2.RelicRow
  L6_2 = L6_2.SetID
  if L5_2 ~= L6_2 then
    L5_2 = L0_1._is_any_relic_sufficient_set
    L6_2 = A0_2
    L7_2 = A1_2
    L8_2 = A4_2
    L9_2 = A3_2
    L5_2 = L5_2(L6_2, L7_2, L8_2, L9_2)
    if L5_2 then
      L5_2 = A0_2.RelicRow
      L5_2 = L5_2.SetID
      if L5_2 ~= A4_2 then
        L5_2 = A0_2.RelicRow
        L5_2 = L5_2.SetID
      end
      L5_2 = A0_2 or L5_2
      if L5_2 ~= A3_2 or not A0_2 then
        L5_2 = A1_2
      end
      return L5_2
    end
  end
  L5_2 = A0_2.Rarity
  L6_2 = A1_2.Rarity
  if L5_2 ~= L6_2 then
    L5_2 = L0_1.compare_by_rarity
    L6_2 = A0_2
    L7_2 = A1_2
    L8_2 = true
    L5_2 = L5_2(L6_2, L7_2, L8_2)
    L5_2 = A0_2 or L5_2
    if not L5_2 or not A0_2 then
      L5_2 = A1_2
    end
    return L5_2
  end
  L5_2 = A0_2.IsDiscard
  L6_2 = A1_2.IsDiscard
  if L5_2 ~= L6_2 then
    L5_2 = A0_2.IsDiscard
    L5_2 = A1_2 or L5_2
    if not L5_2 or not A1_2 then
      L5_2 = A0_2
    end
    return L5_2
  end
  if A2_2 ~= nil then
    L5_2 = L0_1.compare_by_property_type
    L6_2 = A0_2
    L7_2 = A1_2
    L8_2 = A2_2
    L9_2 = true
    L5_2 = L5_2(L6_2, L7_2, L8_2, L9_2)
    L5_2 = A0_2 or L5_2
    if not L5_2 or not A0_2 then
      L5_2 = A1_2
    end
    return L5_2
  end
  L5_2 = L0_1.compare_by_level
  L6_2 = A0_2
  L7_2 = A1_2
  L8_2 = true
  L5_2 = L5_2(L6_2, L7_2, L8_2)
  L5_2 = A0_2 or L5_2
  if not L5_2 or not A0_2 then
    L5_2 = A1_2
  end
  return L5_2
end
L0_1._match = L8_1
function L8_1(A0_2, A1_2, A2_2, A3_2)
  local L4_2
  L4_2 = A0_2.RelicRow
  L4_2 = L4_2.SetID
  if L4_2 ~= A2_2 then
    L4_2 = A0_2.RelicRow
    L4_2 = L4_2.SetID
    if L4_2 ~= A3_2 then
      goto lbl_11
    end
  end
  L4_2 = true
  do return L4_2 end
  ::lbl_11::
  L4_2 = A1_2.RelicRow
  L4_2 = L4_2.SetID
  if L4_2 ~= A2_2 then
    L4_2 = A1_2.RelicRow
    L4_2 = L4_2.SetID
    if L4_2 ~= A3_2 then
      goto lbl_21
    end
  end
  L4_2 = true
  do return L4_2 end
  ::lbl_21::
  L4_2 = false
  return L4_2
end
L0_1._is_any_relic_sufficient_set = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2
  if A1_2 ~= nil then
    L3_2 = A1_2.Set4IDList
    if L3_2 ~= nil then
      goto lbl_8
    end
  end
  L3_2 = nil
  do return L3_2 end
  ::lbl_8::
  L3_2 = nil
  L4_2 = false
  L6_2 = A0_2
  L5_2 = A0_2.GetRelicList
  L5_2 = L5_2(L6_2)
  L6_2 = 0
  L7_2 = L5_2.Count
  L7_2 = L7_2 - 1
  L8_2 = 1
  for L9_2 = L6_2, L7_2, L8_2 do
    L10_2 = L5_2[L9_2]
    L11_2 = L0_1.is_planar_suit
    L12_2 = L10_2.RelicRow
    L12_2 = L12_2.Type
    L11_2 = L11_2(L12_2)
    if not L11_2 then
      L4_2 = true
      L11_2 = L0_1._get_recommend_set_id
      L12_2 = A0_2
      L13_2 = L10_2.RelicRow
      L13_2 = L13_2.SetID
      L14_2 = A2_2
      L11_2 = L11_2(L12_2, L13_2, L14_2)
      L3_2 = L11_2
      if L3_2 ~= nil then
        return L3_2
      else
        break
      end
    end
  end
  if not L4_2 then
    L6_2 = 0
    L7_2 = A1_2.Set4IDList
    L7_2 = L7_2.Length
    L7_2 = L7_2 - 1
    L8_2 = 1
    for L9_2 = L6_2, L7_2, L8_2 do
      L10_2 = L0_1._get_recommend_set_id
      L11_2 = A0_2
      L12_2 = A1_2.Set4IDList
      L12_2 = L12_2[L9_2]
      L13_2 = A2_2
      L10_2 = L10_2(L11_2, L12_2, L13_2)
      L3_2 = L10_2
      if L3_2 ~= nil then
        return L3_2
      end
    end
  end
end
L0_1._get_recommend_set4_id = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2
  if A1_2 ~= nil then
    L3_2 = A1_2.Set2IDList
    if L3_2 ~= nil then
      goto lbl_8
    end
  end
  L3_2 = nil
  do return L3_2 end
  ::lbl_8::
  L3_2 = nil
  L4_2 = false
  L6_2 = A0_2
  L5_2 = A0_2.GetRelicList
  L5_2 = L5_2(L6_2)
  L6_2 = 0
  L7_2 = L5_2.Count
  L7_2 = L7_2 - 1
  L8_2 = 1
  for L9_2 = L6_2, L7_2, L8_2 do
    L10_2 = L5_2[L9_2]
    L11_2 = L0_1.is_planar_suit
    L12_2 = L10_2.RelicRow
    L12_2 = L12_2.Type
    L11_2 = L11_2(L12_2)
    if L11_2 then
      L4_2 = true
      L11_2 = L0_1._get_recommend_set_id
      L12_2 = A0_2
      L13_2 = L10_2.RelicRow
      L13_2 = L13_2.SetID
      L14_2 = A2_2
      L11_2 = L11_2(L12_2, L13_2, L14_2)
      L3_2 = L11_2
      if L3_2 ~= nil then
        return L3_2
      else
        break
      end
    end
  end
  if not L4_2 then
    L6_2 = 0
    L7_2 = A1_2.Set2IDList
    L7_2 = L7_2.Length
    L7_2 = L7_2 - 1
    L8_2 = 1
    for L9_2 = L6_2, L7_2, L8_2 do
      L10_2 = L0_1._get_recommend_set_id
      L11_2 = A0_2
      L12_2 = A1_2.Set2IDList
      L12_2 = L12_2[L9_2]
      L13_2 = A2_2
      L10_2 = L10_2(L11_2, L12_2, L13_2)
      L3_2 = L10_2
      if L3_2 ~= nil then
        return L3_2
      end
    end
  end
end
L0_1._get_recommend_set2_id = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2
  L3_2 = CS
  L3_2 = L3_2.RPG
  L3_2 = L3_2.GameCore
  L3_2 = L3_2.RelicSetConfigExcelTable
  L3_2 = L3_2.GetData
  L4_2 = A1_2
  L3_2 = L3_2(L4_2)
  L4_2 = L3_2.SetSkillList
  L5_2 = L3_2.SetSkillList
  L5_2 = L5_2.Length
  L5_2 = L5_2 - 1
  L4_2 = L4_2[L5_2]
  L5_2 = {}
  L7_2 = A0_2
  L6_2 = A0_2.GetRelicList
  L6_2 = L6_2(L7_2)
  L7_2 = 0
  L8_2 = L6_2.Count
  L8_2 = L8_2 - 1
  L9_2 = 1
  for L10_2 = L7_2, L8_2, L9_2 do
    L11_2 = L6_2[L10_2]
    L12_2 = L11_2.RelicRow
    L12_2 = L12_2.SetID
    if L12_2 == A1_2 then
      L12_2 = L11_2.RelicRow
      L12_2 = L12_2.Type
      L5_2[L12_2] = true
    end
  end
  L7_2 = 1
  while true do
    L8_2 = #A2_2
    if not (L7_2 <= L8_2) then
      break
    end
    L8_2 = A2_2[L7_2]
    L9_2 = L8_2.RelicRow
    L9_2 = L9_2.Type
    L9_2 = L5_2[L9_2]
    if L9_2 == nil then
      L9_2 = L8_2.BelongAvatarID
      if L9_2 == 0 then
        L9_2 = L8_2.RelicRow
        L9_2 = L9_2.SetID
        if L9_2 == A1_2 then
          L9_2 = L8_2.RelicRow
          L9_2 = L9_2.Type
          L5_2[L9_2] = true
        end
      end
    end
    L7_2 = L7_2 + 1
  end
  L8_2 = G
  L8_2 = L8_2.Utils
  L8_2 = L8_2.get_table_length
  L9_2 = L5_2
  L8_2 = L8_2(L9_2)
  if L8_2 == L4_2 then
    return A1_2
  end
end
L0_1._get_recommend_set_id = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2
  L1_2 = {}
  L2_2 = 1
  L3_2 = 6
  L4_2 = 1
  for L5_2 = L2_2, L3_2, L4_2 do
    L6_2 = G
    L6_2 = L6_2.Utils
    L6_2 = L6_2.enum_from_int_str
    L7_2 = CS
    L7_2 = L7_2.RPG
    L7_2 = L7_2.GameCore
    L7_2 = L7_2.RelicType
    L8_2 = L5_2
    L6_2 = L6_2(L7_2, L8_2)
    L7_2 = L0_1.get_relic_from_avatar
    L8_2 = L6_2
    L9_2 = A0_2
    L7_2 = L7_2(L8_2, L9_2)
    if L7_2 then
      L7_2 = #L1_2
      L7_2 = L7_2 + 1
      L1_2[L7_2] = L6_2
    end
  end
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.Client
  L2_2 = L2_2.NetworkManager
  L2_2 = L2_2.FFOMLPONIFB
  L3_2 = L2_2
  L2_2 = L2_2.IDJHDEPGNME
  L4_2 = A0_2.RealID
  L5_2 = L1_2
  L2_2(L3_2, L4_2, L5_2)
end
L0_1.do_take_off_all_relic = L8_1
function L8_1()
  local L0_2, L1_2
  L0_2 = L0_1._all_relic_set_id_list
  if L0_2 == nil then
    L0_2 = G
    L0_2 = L0_2.Utils
    L0_2 = L0_2.create_lua_table_from_cs_list
    L1_2 = CS
    L1_2 = L1_2.RPG
    L1_2 = L1_2.Client
    L1_2 = L1_2.RelicUtils
    L1_2 = L1_2.GetAllRelicSetID
    L1_2 = L1_2()
    L0_2 = L0_2(L1_2)
    L0_1._all_relic_set_id_list = L0_2
  end
  L0_2 = L0_1._all_relic_set_id_list
  return L0_2
end
L0_1.get_all_relic_set_ids = L8_1
function L8_1(A0_2, A1_2, A2_2, A3_2, A4_2)
  local L5_2, L6_2, L7_2, L8_2, L9_2
  L5_2 = CS
  L5_2 = L5_2.RPG
  L5_2 = L5_2.Client
  L5_2 = L5_2.RelicUtils
  L5_2 = L5_2.GetCompareValue
  L6_2 = A2_2
  L7_2 = A0_2
  L5_2 = L5_2(L6_2, L7_2)
  L6_2 = CS
  L6_2 = L6_2.RPG
  L6_2 = L6_2.Client
  L6_2 = L6_2.RelicUtils
  L6_2 = L6_2.GetCompareValue
  L7_2 = A2_2
  L8_2 = A1_2
  L6_2 = L6_2(L7_2, L8_2)
  if L5_2 == L6_2 then
    if A4_2 ~= nil then
      L7_2 = A4_2
      L8_2 = A0_2
      L9_2 = A1_2
      L7_2 = L7_2(L8_2, L9_2)
      L8_2 = false
      return L7_2, L8_2
    end
    L7_2 = CS
    L7_2 = L7_2.RPG
    L7_2 = L7_2.Client
    L7_2 = L7_2.RelicUtils
    L7_2 = L7_2.DefaultCompare
    L8_2 = A0_2
    L9_2 = A1_2
    L7_2 = L7_2(L8_2, L9_2)
    L8_2 = false
    return L7_2, L8_2
  elseif A3_2 then
    L7_2 = L5_2 > L6_2
    L8_2 = true
    return L7_2, L8_2
  else
    L7_2 = L5_2 < L6_2
    L8_2 = true
    return L7_2, L8_2
  end
end
L0_1.compare = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2
  if A0_2 == A1_2 then
    L2_2 = false
    return L2_2
  end
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.Client
  L2_2 = L2_2.RelicUtils
  L2_2 = L2_2.DefaultCompare
  L3_2 = A0_2
  L4_2 = A1_2
  return L2_2(L3_2, L4_2)
end
L0_1.default_compare = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2
  if A0_2 == A1_2 then
    L2_2 = false
    return L2_2
  end
  L2_2 = A0_2.Rarity
  L3_2 = A1_2.Rarity
  if L2_2 ~= L3_2 then
    L2_2 = A0_2.Rarity
    L3_2 = A1_2.Rarity
    L2_2 = L2_2 > L3_2
    return L2_2
  end
  L2_2 = A0_2.ConfigID
  L3_2 = A1_2.ConfigID
  L2_2 = L2_2 < L3_2
  return L2_2
end
L0_1.non_relic_default_compare = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2
  L3_2 = A0_2.Rarity
  L4_2 = A1_2.Rarity
  if L3_2 == L4_2 then
    L3_2 = L0_1.default_compare
    L4_2 = A0_2
    L5_2 = A1_2
    L3_2 = L3_2(L4_2, L5_2)
    L4_2 = false
    return L3_2, L4_2
  end
  if A2_2 then
    L3_2 = A0_2.Rarity
    L4_2 = A1_2.Rarity
    L3_2 = L3_2 > L4_2
    L4_2 = true
    return L3_2, L4_2
  else
    L3_2 = A0_2.Rarity
    L4_2 = A1_2.Rarity
    L3_2 = L3_2 < L4_2
    L4_2 = true
    return L3_2, L4_2
  end
end
L0_1.compare_by_rarity = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2
  L3_2 = A0_2.Level
  L4_2 = A1_2.Level
  if L3_2 == L4_2 then
    L3_2 = L0_1.default_compare
    L4_2 = A0_2
    L5_2 = A1_2
    L3_2 = L3_2(L4_2, L5_2)
    L4_2 = false
    return L3_2, L4_2
  end
  if A2_2 then
    L3_2 = A0_2.Level
    L4_2 = A1_2.Level
    L3_2 = L3_2 > L4_2
    L4_2 = true
    return L3_2, L4_2
  else
    L3_2 = A0_2.Level
    L4_2 = A1_2.Level
    L3_2 = L3_2 < L4_2
    L4_2 = true
    return L3_2, L4_2
  end
end
L0_1.compare_by_level = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2
  L3_2 = A0_2.UID
  L4_2 = A1_2.UID
  if L3_2 == L4_2 then
    L3_2 = L0_1.default_compare
    L4_2 = A0_2
    L5_2 = A1_2
    L3_2 = L3_2(L4_2, L5_2)
    L4_2 = false
    return L3_2, L4_2
  end
  if A2_2 then
    L3_2 = A0_2.UID
    L4_2 = A1_2.UID
    L3_2 = L3_2 > L4_2
    L4_2 = true
    return L3_2, L4_2
  else
    L3_2 = A0_2.UID
    L4_2 = A1_2.UID
    L3_2 = L3_2 < L4_2
    L4_2 = true
    return L3_2, L4_2
  end
end
L0_1.compare_by_obtain_time = L8_1
function L8_1(A0_2, A1_2, A2_2, A3_2)
  local L4_2, L5_2, L6_2, L7_2, L8_2
  L5_2 = A0_2
  L4_2 = A0_2.GetPropertyValue
  L6_2 = A2_2
  L4_2 = L4_2(L5_2, L6_2)
  L6_2 = A1_2
  L5_2 = A1_2.GetPropertyValue
  L7_2 = A2_2
  L5_2 = L5_2(L6_2, L7_2)
  if L4_2 == L5_2 then
    L6_2 = L0_1.default_compare
    L7_2 = A0_2
    L8_2 = A1_2
    L6_2 = L6_2(L7_2, L8_2)
    L7_2 = false
    return L6_2, L7_2
  end
  if A3_2 then
    L6_2 = L4_2 > L5_2
    L7_2 = true
    return L6_2, L7_2
  else
    L6_2 = L4_2 < L5_2
    L7_2 = true
    return L6_2, L7_2
  end
end
L0_1.compare_by_property_type = L8_1
L8_1 = CS
L8_1 = L8_1.RPG
L8_1 = L8_1.GameCore
L8_1 = L8_1.ItemMainType
L0_1.ItemMainType = L8_1
L8_1 = CS
L8_1 = L8_1.RPG
L8_1 = L8_1.GameCore
L8_1 = L8_1.ItemRarity
L0_1.ItemRarity = L8_1
L8_1 = CS
L8_1 = L8_1.RPG
L8_1 = L8_1.GameCore
L8_1 = L8_1.ConstValueCommonExcelTable
L8_1 = L8_1.GetData
L9_1 = "Relic_Rank5_ReturnItem_RelicRemains_ItemID"
L8_1 = L8_1(L9_1)
L8_1 = L8_1.Value
L8_1 = L8_1.IntValue
L0_1._super_rare_relic_return_item_id = L8_1
L8_1 = CS
L8_1 = L8_1.RPG
L8_1 = L8_1.GameCore
L8_1 = L8_1.ConstValueCommonExcelTable
L8_1 = L8_1.GetData
L9_1 = "Relic_Rank5_ReturnItem_RelicRemains_ItemNum"
L8_1 = L8_1(L9_1)
L8_1 = L8_1.Value
L8_1 = L8_1.IntValue
L0_1._super_rare_relic_return_item_num = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2
  L2_2 = {}
  L3_2 = pairs
  L4_2 = A0_2
  L3_2, L4_2, L5_2 = L3_2(L4_2)
  for L6_2, L7_2 in L3_2, L4_2, L5_2 do
    L8_2 = L0_1._fill_return_item_list_from_material
    L9_2 = L2_2
    L10_2 = L7_2
    L11_2 = A1_2
    L8_2(L9_2, L10_2, L11_2)
  end
  L3_2 = {}
  L4_2 = pairs
  L5_2 = L2_2
  L4_2, L5_2, L6_2 = L4_2(L5_2)
  for L7_2, L8_2 in L4_2, L5_2, L6_2 do
    L9_2 = table
    L9_2 = L9_2.insert
    L10_2 = L3_2
    L11_2 = {}
    L11_2.ItemID = L7_2
    L11_2.Num = L8_2
    L9_2(L10_2, L11_2)
  end
  L4_2 = G
  L4_2 = L4_2.RewardUtils
  L4_2 = L4_2.sort_reward_item
  L5_2 = L3_2
  L4_2(L5_2)
  return L3_2
end
L0_1.get_sell_return_items = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2, L13_2, L14_2
  L3_2 = A1_2.item
  L4_2 = A1_2.count
  if not A2_2 then
    L5_2 = L3_2.ItemMainType
    L6_2 = L0_1.ItemMainType
    L6_2 = L6_2.Relic
    L5_2 = L5_2 == L6_2
    if L5_2 then
      L6_2 = L0_1._add_single_return_item
      L7_2 = A0_2
      L8_2 = L0_1._super_rare_relic_return_item_id
      L9_2 = L0_1._super_rare_relic_return_item_num
      L9_2 = L9_2 * L4_2
      L6_2(L7_2, L8_2, L9_2)
      return
    end
  end
  L5_2 = L3_2.Row
  L5_2 = L5_2.ReturnItemIDList
  if L5_2 == nil then
    return
  end
  L6_2 = 0
  L7_2 = L5_2.Length
  L7_2 = L7_2 - 1
  L8_2 = 1
  for L9_2 = L6_2, L7_2, L8_2 do
    L10_2 = L5_2[L9_2]
    L11_2 = L0_1._add_single_return_item
    L12_2 = A0_2
    L13_2 = L10_2.ItemID
    L14_2 = L10_2.ItemNum
    L14_2 = L14_2 * L4_2
    L11_2(L12_2, L13_2, L14_2)
  end
end
L0_1._fill_return_item_list_from_material = L8_1
function L8_1(A0_2, A1_2, A2_2)
  local L3_2
  L3_2 = A0_2[A1_2]
  if not L3_2 then
    L3_2 = 0
  end
  L3_2 = L3_2 + A2_2
  A0_2[A1_2] = L3_2
end
L0_1._add_single_return_item = L8_1
L8_1 = CS
L8_1 = L8_1.RPG
L8_1 = L8_1.GameCore
L8_1 = L8_1.RelicType
L0_1.RelicType = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2
  if A0_2 == nil then
    L1_2 = L0_1.RelicType
    A0_2 = L1_2.Unknow
  end
  L1_2 = CS
  L1_2 = L1_2.RPG
  L1_2 = L1_2.GameCore
  L1_2 = L1_2.RelicBaseTypeExcelTable
  L1_2 = L1_2.GetData
  L2_2 = A0_2
  L1_2 = L1_2(L2_2)
  if L1_2 == nil then
    L2_2 = {}
    return L2_2
  end
  L2_2 = G
  L2_2 = L2_2.Utils
  L2_2 = L2_2.create_lua_table_from_cs_array
  L3_2 = L1_2.ValidPropertyList
  return L2_2(L3_2)
end
L0_1.get_available_property_by_relic_type = L8_1
function L8_1(A0_2)
  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2
  L1_2 = {}
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.GameCore
  L2_2 = L2_2.RelicMainAffixConfigExcelTable
  L2_2 = L2_2.GetEnumerator
  L2_2 = L2_2()
  while true do
    L4_2 = L2_2
    L3_2 = L2_2.MoveNext
    L3_2 = L3_2(L4_2)
    if not L3_2 then
      break
    end
    L3_2 = L2_2.Current
    L4_2 = L3_2.GroupID
    if L4_2 == A0_2 then
      L4_2 = L3_2.IsAvailable
      if L4_2 then
        L4_2 = table
        L4_2 = L4_2.insert
        L5_2 = L1_2
        L6_2 = L3_2.Property
        L4_2(L5_2, L6_2)
      end
    end
  end
  L4_2 = L2_2
  L3_2 = L2_2.Dispose
  L3_2(L4_2)
  return L1_2
end
L0_1._get_main_affix_property_by_group_id = L8_1
function L8_1(A0_2, A1_2)
  local L2_2, L3_2, L4_2, L5_2
  L2_2 = CS
  L2_2 = L2_2.RPG
  L2_2 = L2_2.GameCore
  L2_2 = L2_2.RelicConfigExcelTable
  L2_2 = L2_2.GetSetRelicTypeItemDict
  L3_2 = A0_2
  L2_2 = L2_2(L3_2)
  if L2_2 ~= nil then
    L4_2 = L2_2
    L3_2 = L2_2.ContainsKey
    L5_2 = A1_2
    L3_2 = L3_2(L4_2, L5_2)
    if L3_2 then
      L3_2 = L2_2[A1_2]
      return L3_2
    end
  end
  L3_2 = 0
  return L3_2
end
L0_1.get_set_relic_type_item_id = L8_1
return L0_1
