undefined4 SetHWAntennaDivsersity(int param_1,char param_2)

{
  char cVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  char *pcVar5;
  int iVar6;
  uint uVar7;
  byte bVar8;
  
  uVar3 = Status;
  if (param_2 == '\x01') {
    RT30xxWriteRFRegister(param_1,0x1d,0xd0);
    uVar3 = Status;
    cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    uVar4 = 0;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar3 & 1;
        }
        iVar6 = 0;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) {
            if (cVar1 == '\0') {
              *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xb2f00;
            }
            iVar2 = 1;
            while( true ) {
              uVar3 = 0;
              if (*(char *)(param_1 + 0xec) == '\0') {
                uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
              }
              if (((uVar3 & 0x20000) == 0) || (iVar2 == 100)) break;
              iVar2 = iVar2 + 1;
            }
            if ((uVar3 & 0x2ff00) == 0x2f00) {
              uVar4 = uVar3 & 0xff;
              goto LAB_00058394;
            }
          }
          iVar6 = iVar6 + 1;
          if (iVar6 == 100) break;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        uVar4 = 0;
LAB_00058394:
        if ((int)(uVar3 << 0xe) < 0) {
          printk("ERROR!!! ");
          printk("BBP(viaMCU=%d) read R%d fail\n",0,0x2f);
          uVar4 = (uint)*(byte *)(param_1 + 0x4af8);
LAB_00058528:
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
      }
      else {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar3 & 1;
        }
        iVar6 = 0;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) {
            if (cVar1 == '\0') {
              *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xb2f00;
            }
            AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
            RTMPusecDelay(1000);
            iVar2 = 1;
            while( true ) {
              uVar3 = 0;
              if (*(char *)(param_1 + 0xec) == '\0') {
                uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
              }
              if (((uVar3 & 0x20000) == 0) || (iVar2 == 100)) break;
              iVar2 = iVar2 + 1;
            }
            if ((uVar3 & 0x2ff00) == 0x2f00) {
              uVar4 = uVar3 & 0xff;
              goto LAB_000584d0;
            }
          }
          iVar6 = iVar6 + 1;
          if (iVar6 == 100) break;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        uVar4 = 0;
LAB_000584d0:
        if ((int)(uVar3 << 0xe) < 0) {
          printk("ERROR!!! ");
          printk("BBP(viaMCU=%d) read R%d fail\n",1,0x2f);
          uVar4 = (uint)*(byte *)(param_1 + 0x4af8);
          if (*(char *)(param_1 + 0xec) == '\0') {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
                 *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          }
          goto LAB_00058528;
        }
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      if (cVar1 == '\x01') {
        Status = Status & 0xfffffffe;
        if (uVar7 != 0) {
          Status = Status | 1;
        }
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      bVar8 = (byte)uVar4 | 0x80;
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00058624;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar4 | 0xa2f80;
        }
        *(byte *)(param_1 + 0x4af8) = bVar8;
        if (iVar6 != 100) goto LAB_00058644;
LAB_00058624:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x2f);
LAB_00058644:
        if (*(char *)(param_1 + 0xad) == '\x01') {
LAB_000587fc:
          Status = Status & 0xfffffffe;
          if (uVar7 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar7 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar7 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_000587a0;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar4 | 0xa2f80;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar4 | 0x82f80;
        }
        *(byte *)(param_1 + 0x4af8) = bVar8;
        if (iVar6 != 100) goto LAB_000587e8;
LAB_000587a0:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x2f);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_000587e8:
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        if (cVar1 == '\x01') goto LAB_000587fc;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_000588ec;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa96c0;
        }
        *(undefined1 *)(param_1 + 0x4b5f) = 0xc0;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00058910;
        }
LAB_000588ec:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x96);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00058910:
        if (cVar1 == '\x01') {
LAB_00058ad4:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00058a78;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa96c0;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x896c0;
        }
        *(undefined1 *)(param_1 + 0x4b5f) = 0xc0;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00058ac4;
        }
LAB_00058a78:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x96);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_00058ac4:
        if (cVar1 == '\x01') goto LAB_00058ad4;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00058bc4;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa97b0;
        }
        *(undefined1 *)(param_1 + 0x4b60) = 0xb0;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00058be8;
        }
LAB_00058bc4:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x97);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00058be8:
        if (cVar1 == '\x01') {
LAB_00058dac:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00058d50;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa97b0;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x897b0;
        }
        *(undefined1 *)(param_1 + 0x4b60) = 0xb0;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00058d9c;
        }
LAB_00058d50:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x97);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_00058d9c:
        if (cVar1 == '\x01') goto LAB_00058dac;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00058e9c;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9823;
        }
        *(undefined1 *)(param_1 + 0x4b61) = 0x23;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00058ec0;
        }
LAB_00058e9c:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x98);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00058ec0:
        if (cVar1 == '\x01') {
LAB_00059084:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00059028;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9823;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89823;
        }
        *(undefined1 *)(param_1 + 0x4b61) = 0x23;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00059074;
        }
LAB_00059028:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x98);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_00059074:
        if (cVar1 == '\x01') goto LAB_00059084;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00059174;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9934;
        }
        *(undefined1 *)(param_1 + 0x4b62) = 0x34;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00059198;
        }
LAB_00059174:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x99);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00059198:
        if (cVar1 == '\x01') {
LAB_0005935c:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00059300;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9934;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89934;
        }
        *(undefined1 *)(param_1 + 0x4b62) = 0x34;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_0005934c;
        }
LAB_00059300:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x99);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_0005934c:
        if (cVar1 == '\x01') goto LAB_0005935c;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_0005944c;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9a10;
        }
        *(undefined1 *)(param_1 + 0x4b63) = 0x10;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00059470;
        }
LAB_0005944c:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x9a);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00059470:
        if (cVar1 == '\x01') {
LAB_00059634:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_000595d8;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9a10;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89a10;
        }
        *(undefined1 *)(param_1 + 0x4b63) = 0x10;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00059624;
        }
LAB_000595d8:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x9a);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_00059624:
        if (cVar1 == '\x01') goto LAB_00059634;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00059724;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9b3b;
        }
        *(undefined1 *)(param_1 + 0x4b64) = 0x3b;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_00059748;
        }
LAB_00059724:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x9b);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00059748:
        if (cVar1 == '\x01') {
LAB_0005990c:
          Status = Status & 0xfffffffe;
          if (uVar4 != 0) {
            Status = Status | 1;
          }
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_000598b0;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9b3b;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89b3b;
        }
        *(undefined1 *)(param_1 + 0x4b64) = 0x3b;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto LAB_000598fc;
        }
LAB_000598b0:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0x9b);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
LAB_000598fc:
        if (cVar1 == '\x01') goto LAB_0005990c;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    uVar3 = Status;
    if (cVar1 == '\0') {
      if (*(int *)(param_1 + 0x29f8) == 4) {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar6 = iVar6 + 1;
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_000599fc;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xafd05;
        }
        *(undefined1 *)(param_1 + 0x4bc6) = 5;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto joined_r0x00059bd8;
        }
LAB_000599fc:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0xfd);
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        uVar4 = 0;
        if (*(char *)(param_1 + 0xad) == '\x01') {
          Status = Status & 0xfffffffe;
          uVar4 = uVar3 & 1;
        }
        iVar6 = 1;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        while( true ) {
          uVar3 = 0;
          if (cVar1 == '\0') {
            uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
          }
          if ((uVar3 & 0x20000) == 0) break;
          iVar2 = iVar6 % 0x14;
          iVar6 = iVar6 + 1;
          if ((iVar2 == 0) && (cVar1 == '\0')) {
            *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
          }
          printk(&_LC19)   //possible issue identified - semgrep
          if (iVar6 == 100) goto LAB_00059b88;
          cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        }
        if (cVar1 == '\0') {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xafd05;
        }
        iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
        if (*(char *)(param_1 + 0x16964) == '\x01') {
          RTMPusecDelay(1000);
        }
        if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
          *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x8fd05;
        }
        *(undefined1 *)(param_1 + 0x4bc6) = 5;
        if (iVar6 != 100) {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
          goto joined_r0x00059bd8;
        }
LAB_00059b88:
        printk("ERROR!!! ");
        printk("BBP write R%d fail\n",0xfd);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
        else {
          cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        }
      }
joined_r0x00059bd8:
      if ((cVar1 == '\x01') && (Status = Status & 0xfffffffe, uVar4 != 0)) {
        Status = Status | 1;
      }
    }
    if (RTDebugLevel < 3) {
      return 0;
    }
    pcVar5 = "HwAnDi> Enable!\n";
    goto LAB_0005a768;
  }
  if (*(char *)(param_1 + 0xec) == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar6 = iVar6 + 1;
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_00059cf0;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9640;
      }
      *(undefined1 *)(param_1 + 0x4b5f) = 0x40;
      if (iVar6 != 100) {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_00059d14;
      }
LAB_00059cf0:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x96);
      cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00059d14:
      if (cVar1 == '\x01') {
LAB_00059ed4:
        Status = Status & 0xfffffffe;
        if (uVar4 != 0) {
          Status = Status | 1;
        }
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar2 = iVar6 % 0x14;
        iVar6 = iVar6 + 1;
        if ((iVar2 == 0) && (cVar1 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
        }
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_00059e78;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9640;
      }
      iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89640;
      }
      *(undefined1 *)(param_1 + 0x4b5f) = 0x40;
      if (iVar6 != 100) {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_00059ec4;
      }
LAB_00059e78:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x96);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
LAB_00059ec4:
      if (cVar1 == '\x01') goto LAB_00059ed4;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
  }
  else {
    cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  uVar3 = Status;
  if (cVar1 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar6 = iVar6 + 1;
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_00059fc4;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9730;
      }
      *(undefined1 *)(param_1 + 0x4b60) = 0x30;
      if (iVar6 != 100) {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_00059fe8;
      }
LAB_00059fc4:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x97);
      cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_00059fe8:
      if (cVar1 == '\x01') {
LAB_0005a1ac:
        Status = Status & 0xfffffffe;
        if (uVar4 != 0) {
          Status = Status | 1;
        }
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar2 = iVar6 % 0x14;
        iVar6 = iVar6 + 1;
        if ((iVar2 == 0) && (cVar1 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
        }
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_0005a150;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9730;
      }
      iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89730;
      }
      *(undefined1 *)(param_1 + 0x4b60) = 0x30;
      if (iVar6 != 100) {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_0005a19c;
      }
LAB_0005a150:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x97);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
LAB_0005a19c:
      if (cVar1 == '\x01') goto LAB_0005a1ac;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
  }
  else {
    cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  uVar3 = Status;
  if (cVar1 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar6 = iVar6 + 1;
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_0005a290;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa9a00;
      }
      *(undefined1 *)(param_1 + 0x4b63) = 0;
      if (iVar6 != 100) goto LAB_0005a2b0;
LAB_0005a290:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x9a);
LAB_0005a2b0:
      cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
    }
    else {
      uVar4 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar4 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar2 = iVar6 % 0x14;
        iVar6 = iVar6 + 1;
        if ((iVar2 == 0) && (cVar1 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
        }
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_0005a410;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa9a00;
      }
      iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x89a00;
      }
      *(undefined1 *)(param_1 + 0x4b63) = 0;
      if (iVar6 != 100) goto LAB_0005a458;
LAB_0005a410:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x9a);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_0005a458:
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
    }
    if ((cVar1 == '\x01') && (Status = Status & 0xfffffffe, uVar4 != 0)) {
      Status = Status | 1;
    }
  }
  uVar3 = Status;
  uVar4 = 0x23;
  if (*(char *)(param_1 + 0x76e86) == '\0') {
    uVar4 = 0xa3;
  }
  if (*(char *)(param_1 + 0xec) == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar7 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar7 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar6 = iVar6 + 1;
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_0005a564;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar4 | 0xa9800;
      }
      *(char *)(param_1 + 0x4b61) = (char)uVar4;
      if (iVar6 != 100) goto LAB_0005a584;
LAB_0005a564:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x98);
LAB_0005a584:
      cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
    }
    else {
      uVar7 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar7 = uVar3 & 1;
      }
      iVar6 = 1;
      cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar3 = 0;
        if (cVar1 == '\0') {
          uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar3 & 0x20000) == 0) break;
        iVar2 = iVar6 % 0x14;
        iVar6 = iVar6 + 1;
        if ((iVar2 == 0) && (cVar1 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
        }
        printk(&_LC19)   //possible issue identified - semgrep
        if (iVar6 == 100) goto LAB_0005a6e0;
        cVar1 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar1 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar4 | 0xa9800;
      }
      iVar2 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar2 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar4 | 0x89800;
      }
      *(char *)(param_1 + 0x4b61) = (char)uVar4;
      if (iVar6 != 100) goto LAB_0005a728;
LAB_0005a6e0:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x98);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_0005a728:
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar1 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
    }
    if ((cVar1 == '\x01') && (Status = Status & 0xfffffffe, uVar7 != 0)) {
      Status = Status | 1;
    }
  }
  if (RTDebugLevel < 3) {
    return 0;
  }
  pcVar5 = "HwAnDi> Disable!\n";
LAB_0005a768:
  printk(pcVar5);
  return 0;
}