Assistant: 
User: If you had written the following C code, what would you name this function and parameters based on its functionality/behaviour? Completely disregard the function name and also the names of any functions called within. Make 100% sure you suggest a possible function name, and also names for the function parameters!


undefined8 FUN_a0034f44(uint param_1,uint param_2,uint param_3,uint param_4)

{
  bool bVar1;
  bool bVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  uint uVar9;
  uint uVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  uint uVar17;
  uint uVar18;
  uint local_14;
  uint uStack_10;
  
  uVar5 = local_14;
  uVar3 = uStack_10;
  if (param_4 != 0) {
    if (param_2 < param_4) {
      return CONCAT44(param_2,param_1);
    }
    if (param_4 < 0x10000) {
      iVar7 = 0;
      if (0xff < param_4) {
        iVar7 = 8;
      }
      uVar15 = 0x20 - ((uint)(byte)(&DAT_a003dac8)[param_4 >> iVar7] + iVar7);
      if (uVar15 != 0) goto LAB_a0035358;
    }
    else {
      iVar7 = 0x10;
      if (0xffffff < param_4) {
        iVar7 = 0x18;
      }
      uVar15 = 0x20 - ((uint)(byte)(&DAT_a003dac8)[param_4 >> iVar7] + iVar7);
      if (uVar15 != 0) {
LAB_a0035358:
        uVar12 = 0x20 - uVar15;
        uVar11 = param_4 << (uVar15 & 0x1f) | param_3 >> (uVar12 & 0x1f);
        uVar8 = param_2 >> (uVar12 & 0x1f);
        uVar9 = uVar11 >> 0x10;
        uVar16 = uVar8 / uVar9;
        uVar17 = uVar16 * (uVar11 & 0xffff);
        uVar10 = param_2 << (uVar15 & 0x1f) | param_1 >> (uVar12 & 0x1f);
        uVar6 = uVar8 % uVar9 << 0x10 | uVar10 >> 0x10;
        uVar13 = param_3 << (uVar15 & 0x1f);
        uVar14 = param_1 << (uVar15 & 0x1f);
        uVar8 = uVar16;
        if (uVar6 < uVar17) {
          uVar6 = uVar6 + uVar11;
          uVar8 = uVar16 - 1;
          if ((uVar11 <= uVar6) && (uVar6 < uVar17)) {
            uVar6 = uVar6 + uVar11;
            uVar8 = uVar16 - 2;
          }
        }
        uVar16 = (uVar6 - uVar17) / uVar9;
        uVar18 = uVar16 * (uVar11 & 0xffff);
        uVar9 = (uVar6 - uVar17) % uVar9 << 0x10 | uVar10 & 0xffff;
        uVar6 = uVar16;
        if (uVar9 < uVar18) {
          uVar9 = uVar9 + uVar11;
          uVar6 = uVar16 - 1;
          if ((uVar11 <= uVar9) && (uVar9 < uVar18)) {
            uVar9 = uVar9 + uVar11;
            uVar6 = uVar16 - 2;
          }
        }
        uVar10 = (uVar6 & 0xffff) * (uVar13 & 0xffff);
        uVar8 = (uVar8 << 0x10 | uVar6) >> 0x10;
        uVar9 = uVar9 - uVar18;
        uVar16 = uVar8 * (uVar13 & 0xffff);
        iVar7 = uVar8 * (uVar13 >> 0x10);
        uVar8 = (uVar6 & 0xffff) * (uVar13 >> 0x10) + (uVar10 >> 0x10) + uVar16;
        if (uVar8 < uVar16) {
          iVar7 = iVar7 + 0x10000;
        }
        uVar6 = (uVar8 >> 0x10) + iVar7;
        uVar8 = uVar8 * 0x10000 + (uVar10 & 0xffff);
        if ((uVar9 < uVar6) ||
           (uVar10 = uVar8, uVar16 = uVar6,
           (~(-(uVar6 ^ uVar9) | uVar6 ^ uVar9) >> 0x1f & (uint)(uVar14 < uVar8)) != 0)) {
          uVar10 = uVar8 - uVar13;
          uVar16 = uVar6 - uVar11;
          if (uVar8 < uVar10) {
            uVar16 = (uVar6 - uVar11) - 1;
          }
        }
        if (&stack0x00000000 != (undefined *)0x14) {
          uVar3 = uVar9 - uVar16;
          if (uVar14 < uVar14 - uVar10) {
            uVar3 = (uVar9 - uVar16) - 1;
          }
          uVar5 = uVar3 << (uVar12 & 0x1f) | uVar14 - uVar10 >> (uVar15 & 0x1f);
          uVar3 = uVar3 >> (uVar15 & 0x1f);
        }
        goto LAB_a0035070;
      }
      uVar15 = 0;
    }
    uVar5 = 1;
    if (param_2 <= param_4) {
      uVar5 = uVar15;
    }
    uVar3 = 1;
    if (param_1 < param_3) {
      uVar3 = uVar15;
    }
    if (uVar5 != 0 || uVar3 != 0) {
      uVar5 = param_1 - param_3;
      param_2 = param_2 - param_4;
      bVar2 = param_1 < uVar5;
      param_1 = uVar5;
      if (bVar2) {
        param_2 = param_2 - 1;
      }
    }
    uVar5 = param_1;
    uVar3 = param_2;
    if (&stack0x00000000 == (undefined *)0x14) {
      uVar5 = local_14;
      uVar3 = uStack_10;
    }
    goto LAB_a0035070;
  }
  if (param_2 < param_3) {
    if (param_3 < 0x10000) {
      bVar1 = 0xfe < param_3;
      bVar2 = param_3 == 0xff;
      iVar4 = 8;
      iVar7 = 0;
    }
    else {
      bVar1 = 0xfffffe < param_3;
      bVar2 = param_3 == 0xffffff;
      iVar4 = 0x18;
      iVar7 = 0x10;
    }
    if (bVar1 && !bVar2) {
      iVar7 = iVar4;
    }
    uVar15 = 0x20 - ((uint)(byte)(&DAT_a003dac8)[param_3 >> iVar7] + iVar7);
    if (uVar15 != 0) {
      param_2 = param_2 << (uVar15 & 0x1f) | param_1 >> (0x20 - uVar15 & 0x1f);
      param_3 = param_3 << (uVar15 & 0x1f);
      param_1 = param_1 << (uVar15 & 0x1f);
    }
    uVar6 = param_3 >> 0x10;
    uVar9 = (param_2 / uVar6) * (param_3 & 0xffff);
    uVar8 = param_2 % uVar6 << 0x10 | param_1 >> 0x10;
    if (((uVar8 < uVar9) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar9)) {
      uVar8 = uVar8 + param_3;
    }
    uVar10 = ((uVar8 - uVar9) / uVar6) * (param_3 & 0xffff);
    uVar8 = (uVar8 - uVar9) % uVar6 << 0x10 | param_1 & 0xffff;
    if (((uVar8 < uVar10) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar10)) {
      uVar8 = uVar8 + param_3;
    }
    uVar15 = uVar8 - uVar10 >> (uVar15 & 0x1f);
  }
  else {
    if (param_3 == 0) {
      param_3 = 1 / 0;
      if (param_3 < 0x10000) goto LAB_a0035148;
LAB_a0035238:
      iVar7 = 0x10;
      if (0xffffff < param_3) {
        iVar7 = 0x18;
      }
      uVar15 = 0x20 - ((uint)(byte)(&DAT_a003dac8)[param_3 >> iVar7] + iVar7);
      if (uVar15 == 0) goto LAB_a003517c;
LAB_a0035274:
      param_3 = param_3 << (uVar15 & 0x1f);
      uVar8 = param_2 >> (0x20 - uVar15 & 0x1f);
      uVar6 = param_3 >> 0x10;
      uVar10 = param_2 << (uVar15 & 0x1f) | param_1 >> (0x20 - uVar15 & 0x1f);
      uVar9 = param_3 & 0xffff;
      uVar11 = (uVar8 / uVar6) * uVar9;
      param_1 = param_1 << (uVar15 & 0x1f);
      uVar8 = uVar8 % uVar6 << 0x10 | uVar10 >> 0x10;
      if (((uVar8 < uVar11) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar11)) {
        uVar8 = uVar8 + param_3;
      }
      uVar12 = ((uVar8 - uVar11) / uVar6) * uVar9;
      uVar8 = (uVar8 - uVar11) % uVar6 << 0x10 | uVar10 & 0xffff;
      if (((uVar8 < uVar12) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar12)) {
        uVar8 = uVar8 + param_3;
      }
      uVar8 = uVar8 - uVar12;
    }
    else {
      if (0xffff < param_3) goto LAB_a0035238;
LAB_a0035148:
      iVar7 = 0;
      if (0xff < param_3) {
        iVar7 = 8;
      }
      uVar15 = 0x20 - ((uint)(byte)(&DAT_a003dac8)[param_3 >> iVar7] + iVar7);
      if (uVar15 != 0) goto LAB_a0035274;
LAB_a003517c:
      uVar8 = param_2 - param_3;
      uVar6 = param_3 >> 0x10;
      uVar9 = param_3 & 0xffff;
    }
    uVar10 = (uVar8 / uVar6) * uVar9;
    uVar8 = uVar8 % uVar6 << 0x10 | param_1 >> 0x10;
    if (((uVar8 < uVar10) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar10)) {
      uVar8 = uVar8 + param_3;
    }
    uVar9 = ((uVar8 - uVar10) / uVar6) * uVar9;
    uVar8 = (uVar8 - uVar10) % uVar6 << 0x10 | param_1 & 0xffff;
    if (((uVar8 < uVar9) && (uVar8 = uVar8 + param_3, param_3 <= uVar8)) && (uVar8 < uVar9)) {
      uVar8 = uVar8 + param_3;
    }
    uVar15 = uVar8 - uVar9 >> (uVar15 & 0x1f);
  }
  if (&stack0x00000000 != (undefined *)0x14) {
    uStack_10 = 0;
    uVar5 = uVar15;
    uVar3 = uStack_10;
  }
LAB_a0035070:
  uStack_10 = uVar3;
  local_14 = uVar5;
  return CONCAT44(uStack_10,local_14);
}


Assistant: