void RxSensitivityTuning(int param_1)

{
  byte bVar1;
  char cVar2;
  char cVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  
  uVar5 = Status;
  bVar1 = *(byte *)(param_1 + 0x4be0);
  if (bVar1 < 0xf) {
    cVar2 = *(char *)(param_1 + 0x50e4)   //possible issue identified - semgrep
  }
  else if (bVar1 < 0x41) {
    cVar2 = *(char *)(param_1 + 0x50e5)   //possible issue identified - semgrep
  }
  else if (bVar1 < 0x81) {
    cVar2 = *(char *)(param_1 + 0x50e6)   //possible issue identified - semgrep
  }
  else {
    cVar2 = *(char *)(param_1 + 0x50e7)   //possible issue identified - semgrep
  }
  cVar3 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  if (*(char *)(param_1 + 0x76a0c) == -0x80) {
    if (cVar3 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar5 & 1;
        }
        iVar6 = 1;
        cVar3 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar5 = 0;
          if (cVar3 == '\0') {
            uVar5 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar5 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00062278;
          cVar3 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        bVar1 = *(byte *)(param_1 + 0x4be0);
        if (bVar1 < 0xf) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e4);
        }
        else if (bVar1 < 0x41) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e5);
        }
        else if (bVar1 < 0x81) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e6);
        }
        else {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e7);
        }
        if (cVar3 == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar5 + 0x26 & 0xff | 0xa4200;
        }
        bVar1 = *(byte *)(param_1 + 0x4be0);
        if (bVar1 < 0xf) {
          cVar3 = *(char *)(param_1 + 0x50e4)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x41) {
          cVar3 = *(char *)(param_1 + 0x50e5)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x81) {
          cVar3 = *(char *)(param_1 + 0x50e6)   //possible issue identified - semgrep
        }
        else {
          cVar3 = *(char *)(param_1 + 0x50e7)   //possible issue identified - semgrep
        }
        *(char *)(param_1 + 0x4b0b) = cVar3 + '&';
        if (iVar6 != 100) {
          cVar3 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto joined_r0x000624c4;
        }
LAB_00062278:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x42);
        cVar3 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar5 & 1;
        }
        iVar6 = 1;
        cVar3 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar5 = 0;
          if (cVar3 == '\0') {
            uVar5 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar5 & 0x20000) == 0) break;
          iVar4 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar4 == 0) && (cVar3 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar5 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00062474;
          cVar3 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        bVar1 = *(byte *)(param_1 + 0x4be0);
        if (bVar1 < 0xf) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e4);
        }
        else if (bVar1 < 0x41) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e5);
        }
        else if (bVar1 < 0x81) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e6);
        }
        else {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e7);
        }
        uVar5 = uVar5 + 0x26 & 0xff;
        if (cVar3 == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar5 | 0xa4200;
        }
        iVar4 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if (iVar4 == 0) {
          if (*(char *)(param_1 + 0xec) == '\0') {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar5 | 0x84200;
          }
          bVar1 = *(byte *)(param_1 + 0x4be0);
        }
        else {
          bVar1 = *(byte *)(param_1 + 0x4be0);
        }
        if (bVar1 < 0xf) {
          cVar3 = *(char *)(param_1 + 0x50e4)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x41) {
          cVar3 = *(char *)(param_1 + 0x50e5)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x81) {
          cVar3 = *(char *)(param_1 + 0x50e6)   //possible issue identified - semgrep
        }
        else {
          cVar3 = *(char *)(param_1 + 0x50e7)   //possible issue identified - semgrep
        }
        *(char *)(param_1 + 0x4b0b) = cVar3 + '&';
        if (iVar6 != 100) {
          cVar3 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto joined_r0x000624c4;
        }
LAB_00062474:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x42);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar3 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar3 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
      }
joined_r0x000624c4:
      if ((cVar3 == '\x01') && (Status = Status & 0xfffffffe, uVar7 != 0)) {
        Status = Status | 1;
      }
    }
  }
  else {
    iVar6 = 0;
    do {
      uVar5 = 0;
      if (cVar3 == '\0') {
        uVar5 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
      }
      if ((uVar5 & 0x20000) == 0) {
        if (bVar1 < 0xf) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e4);
        }
        else if (bVar1 < 0x41) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e5);
        }
        else if (bVar1 < 0x81) {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e6);
        }
        else {
          uVar5 = (uint)*(byte *)(param_1 + 0x50e7);
        }
        if (cVar3 == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar5 + 0x26 & 0xff | 0xa4200;
        }
        bVar1 = *(byte *)(param_1 + 0x4be0);
        if (bVar1 < 0xf) {
          cVar3 = *(char *)(param_1 + 0x50e4)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x41) {
          cVar3 = *(char *)(param_1 + 0x50e5)   //possible issue identified - semgrep
        }
        else if (bVar1 < 0x81) {
          cVar3 = *(char *)(param_1 + 0x50e6)   //possible issue identified - semgrep
        }
        else {
          cVar3 = *(char *)(param_1 + 0x50e7)   //possible issue identified - semgrep
        }
        *(char *)(param_1 + 0x4b0b) = cVar3 + '&';
        if (iVar6 != 100) goto LAB_000624e4;
        break;
      }
      iVar6 = iVar6 + 1;
    } while (iVar6 != 100);
    if (RTDebugLevel != 0) {
      printk("BBP write R%d fail\n",0x42);
    }
  }
LAB_000624e4:
  if (RTDebugLevel < 3) {
    return;
  }
  printk("turn off R17 tuning, restore to 0x%02x\n",cVar2 + '&');
  return;
}