void RT5350_ChipResumeMsduTransmission(int param_1)

{
  byte bVar1;
  byte bVar2;
  undefined1 uVar3;
  int iVar4;
  char cVar5;
  uint uVar6;
  uint uVar7;
  int iVar8;
  uint uVar9;
  
  uVar6 = Status;
  if ((*(uint *)(param_1 + 0x4a94) & 0xffff0000) != 0x53500000) {
    return;
  }
  uVar7 = 0;
  if (*(char *)(param_1 + 0xec) == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 0;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar6 & 0x20000) == 0) {
          if (cVar5 == '\0') {
            *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xb1b00;
          }
          iVar4 = 1;
          while( true ) {
            uVar6 = 0;
            if (*(char *)(param_1 + 0xec) == '\0') {
              uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
            }
            if (((uVar6 & 0x20000) == 0) || (iVar4 == 100)) break;
            iVar4 = iVar4 + 1;
          }
          if ((uVar6 & 0x2ff00) == 0x1b00) {
            uVar7 = uVar6 & 0xff;
            goto LAB_000c293c;
          }
        }
        iVar8 = iVar8 + 1;
        if (iVar8 == 100) break;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      uVar7 = 0;
LAB_000c293c:
      if ((int)(uVar6 << 0xe) < 0) {
        printk("ERROR!!! ");
        printk("BBP(viaMCU=%d) read R%d fail\n",0,0x1b);
        uVar7 = (uint)*(byte *)(param_1 + 0x4ae4);
LAB_000c2ad4:
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
    }
    else {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 0;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar6 & 0x20000) == 0) {
          if (cVar5 == '\0') {
            *(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xb1b00;
          }
          AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
          RTMPusecDelay(1000);
          iVar4 = 1;
          while( true ) {
            uVar6 = 0;
            if (*(char *)(param_1 + 0xec) == '\0') {
              uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
            }
            if (((uVar6 & 0x20000) == 0) || (iVar4 == 100)) break;
            iVar4 = iVar4 + 1;
          }
          if ((uVar6 & 0x2ff00) == 0x1b00) {
            uVar7 = uVar6 & 0xff;
            goto LAB_000c2a7c;
          }
        }
        iVar8 = iVar8 + 1;
        if (iVar8 == 100) break;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      uVar7 = 0;
LAB_000c2a7c:
      if ((int)(uVar6 << 0xe) < 0) {
        printk("ERROR!!! ");
        printk("BBP(viaMCU=%d) read R%d fail\n",1,0x1b);
        uVar7 = (uint)*(byte *)(param_1 + 0x4ae4);
        if (*(char *)(param_1 + 0xec) == '\0') {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
               *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
        }
        goto LAB_000c2ad4;
      }
      cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
    }
    if (cVar5 == '\x01') {
      Status = Status & 0xfffffffe;
      if (uVar9 != 0) {
        Status = Status | 1;
      }
      goto LAB_000c2af8;
    }
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  else {
LAB_000c2af8:
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  uVar6 = Status;
  uVar7 = uVar7 & 0x9f;
  bVar2 = (byte)uVar7;
  if (cVar5 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar8 = iVar8 + 1;
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c2bdc;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar7 | 0xa1b00;
      }
      *(byte *)(param_1 + 0x4ae4) = bVar2;
      if (iVar8 != 100) {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_000c2c00;
      }
LAB_000c2bdc:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x1b);
      cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_000c2c00:
      if (cVar5 == '\x01') {
LAB_000c2dc0:
        Status = Status & 0xfffffffe;
        if (uVar9 != 0) {
          Status = Status | 1;
        }
        goto LAB_000c2dd0;
      }
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
    else {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar4 = iVar8 % 0x14;
        iVar8 = iVar8 + 1;
        if ((iVar4 == 0) && (cVar5 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar6 & 0xfffdffff;
        }
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c2d64;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar7 | 0xa1b00;
      }
      iVar4 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar4 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar7 | 0x81b00;
      }
      *(byte *)(param_1 + 0x4ae4) = bVar2;
      if (iVar8 != 100) goto LAB_000c2dac;
LAB_000c2d64:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x1b);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_000c2dac:
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      if (cVar5 == '\x01') goto LAB_000c2dc0;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
  }
  else {
LAB_000c2dd0:
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  uVar6 = Status;
  if (cVar5 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar8 = iVar8 + 1;
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c2eac;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = *(byte *)(param_1 + 0x4bd1) | 0xa4200;
      }
      *(undefined1 *)(param_1 + 0x4b0b) = *(undefined1 *)(param_1 + 0x4bd1);
      if (iVar8 != 100) {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_000c2ed0;
      }
LAB_000c2eac:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x42);
      cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
LAB_000c2ed0:
      if (cVar5 == '\x01') {
LAB_000c3094:
        Status = Status & 0xfffffffe;
        if (uVar9 != 0) {
          Status = Status | 1;
        }
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
    }
    else {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar4 = iVar8 % 0x14;
        iVar8 = iVar8 + 1;
        if ((iVar4 == 0) && (cVar5 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar6 & 0xfffdffff;
        }
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c3038;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      bVar1 = *(byte *)(param_1 + 0x4bd1);
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = bVar1 | 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) = bVar1 | 0x84200;
        }
        uVar3 = *(undefined1 *)(param_1 + 0x4bd1);
      }
      else {
        uVar3 = *(undefined1 *)(param_1 + 0x4bd1);
      }
      *(undefined1 *)(param_1 + 0x4b0b) = uVar3;
      if (iVar8 != 100) {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto LAB_000c3084;
      }
LAB_000c3038:
      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;
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
LAB_000c3084:
      if (cVar5 == '\x01') goto LAB_000c3094;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
    }
  }
  else {
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  uVar6 = Status;
  if (cVar5 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar8 = iVar8 + 1;
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c3178;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar7 | 0xa1b20;
      }
      *(byte *)(param_1 + 0x4ae4) = bVar2 | 0x20;
      if (iVar8 != 100) goto LAB_000c3198;
LAB_000c3178:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x1b);
LAB_000c3198:
      if (*(char *)(param_1 + 0xad) != '\x01') {
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        goto LAB_000c3370;
      }
    }
    else {
      uVar9 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar9 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar4 = iVar8 % 0x14;
        iVar8 = iVar8 + 1;
        if ((iVar4 == 0) && (cVar5 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar6 & 0xfffdffff;
        }
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c3300;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar7 | 0xa1b20;
      }
      iVar4 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
      if (*(char *)(param_1 + 0x16964) == '\x01') {
        RTMPusecDelay(1000);
      }
      if ((iVar4 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar7 | 0x81b20;
      }
      *(byte *)(param_1 + 0x4ae4) = bVar2 | 0x20;
      if (iVar8 != 100) goto LAB_000c3348;
LAB_000c3300:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x1b);
      if (*(char *)(param_1 + 0xec) == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
             *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_000c3348:
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      if (cVar5 != '\x01') {
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
        goto LAB_000c3370;
      }
    }
    Status = Status & 0xfffffffe;
    if (uVar9 != 0) {
      Status = Status | 1;
    }
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
  else {
    cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
  }
LAB_000c3370:
  uVar6 = Status;
  if (cVar5 == '\0') {
    if (*(int *)(param_1 + 0x29f8) == 4) {
      uVar7 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar7 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar8 = iVar8 + 1;
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c3444;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = *(byte *)(param_1 + 0x4bd1) | 0xa4200;
      }
      *(undefined1 *)(param_1 + 0x4b0b) = *(undefined1 *)(param_1 + 0x4bd1);
      if (iVar8 != 100) {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto joined_r0x000c3620;
      }
LAB_000c3444:
      printk("ERROR!!! ");
      printk("BBP write R%d fail\n",0x42);
      cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
    }
    else {
      uVar7 = 0;
      if (*(char *)(param_1 + 0xad) == '\x01') {
        Status = Status & 0xfffffffe;
        uVar7 = uVar6 & 1;
      }
      iVar8 = 1;
      cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      while( true ) {
        uVar6 = 0;
        if (cVar5 == '\0') {
          uVar6 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
        }
        if ((uVar6 & 0x20000) == 0) break;
        iVar4 = iVar8 % 0x14;
        iVar8 = iVar8 + 1;
        if ((iVar4 == 0) && (cVar5 == '\0')) {
          *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar6 & 0xfffdffff;
        }
        printk(&_LC5)   //possible issue identified - semgrep
        if (iVar8 == 100) goto LAB_000c35d0;
        cVar5 = *(char *)(param_1 + 0xec)   //possible issue identified - semgrep
      }
      bVar2 = *(byte *)(param_1 + 0x4bd1);
      if (cVar5 == '\0') {
        *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = bVar2 | 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) = bVar2 | 0x84200;
        }
        uVar3 = *(undefined1 *)(param_1 + 0x4bd1);
      }
      else {
        uVar3 = *(undefined1 *)(param_1 + 0x4bd1);
      }
      *(undefined1 *)(param_1 + 0x4b0b) = uVar3;
      if (iVar8 != 100) {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
        goto joined_r0x000c3620;
      }
LAB_000c35d0:
      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;
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
      else {
        cVar5 = *(char *)(param_1 + 0xad)   //possible issue identified - semgrep
      }
    }
joined_r0x000c3620:
    if ((cVar5 == '\x01') && (Status = Status & 0xfffffffe, uVar7 != 0)) {
      Status = Status | 1;
    }
  }
  return;
}