void ChipSwitchChannel(int param_1,byte param_2,char param_3)
{
bool bVar1;
byte bVar2;
undefined1 uVar3;
int iVar4;
int iVar5;
char cVar6;
byte *pbVar7;
uint uVar8;
code cVar9;
uint uVar10;
pbVar7 = (byte *)(param_1 + 0x4c22);
cVar6 = '\x01';
do {
bVar2 = *pbVar7;
pbVar7 = pbVar7 + 10;
if (bVar2 == param_2) goto LAB_000641a0;
bVar1 = cVar6 != '6';
cVar6 = cVar6 + '\x01';
} while (bVar1);
if (RTDebugLevel != 0) {
printk("AsicSwitchChannel: Can\'t find the Channel#%d \n",param_2);
}
LAB_000641a0:
if (2 < RTDebugLevel) {
printk("SwitchChannel#%d : unknown RFIC=%d\n",param_2,*(undefined1 *)(param_1 + 0x4bd4));
}
uVar10 = Status;
if (0xe < param_2) {
if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00065c14;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa3e00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b07) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065c38;
}
LAB_00065c14:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3e);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00065c38:
if (cVar6 == '\x01') {
LAB_00065e74:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00065e18;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa3e00;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x83e00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b07) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065e64;
}
LAB_00065e18:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3e);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00065e64:
if (cVar6 == '\x01') goto LAB_00065e74;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00065fd4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa3f00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b08) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065ff8;
}
LAB_00065fd4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3f);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00065ff8:
if (cVar6 == '\x01') {
LAB_00066234:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000661d8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa3f00;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x83f00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b08) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00066224;
}
LAB_000661d8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3f);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00066224:
if (cVar6 == '\x01') goto LAB_00066234;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00066394;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa4000;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b09) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000663b8;
}
LAB_00066394:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x40);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000663b8:
if (cVar6 == '\x01') {
LAB_000665f4:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00066598;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa4000;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x84000;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b09) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000665e4;
}
LAB_00066598:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x40);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_000665e4:
if (cVar6 == '\x01') goto LAB_000665f4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000666d8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa5600;
}
*(undefined1 *)(param_1 + 0x4b1f) = 0;
if (iVar4 != 100) goto LAB_000666f8;
LAB_000666d8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x56);
LAB_000666f8:
if (*(char *)(param_1 + 0xad) == '\x01') {
LAB_000668b4:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00066858;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa5600;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if ((iVar5 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x85600;
}
*(undefined1 *)(param_1 + 0x4b1f) = 0;
if (iVar4 != 100) goto LAB_000668a0;
LAB_00066858:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x56);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_000668a0:
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
if (cVar6 == '\x01') goto LAB_000668b4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000669a4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa52f2;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0xf2;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000669c8;
}
LAB_000669a4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000669c8:
if (cVar6 == '\x01') {
LAB_00066b8c:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
iVar4 = *(int *)(param_1 + 0x4bf4);
}
else {
iVar4 = *(int *)(param_1 + 0x4bf4);
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00066b30;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa52f2;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if ((iVar5 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x852f2;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0xf2;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00066b7c;
}
LAB_00066b30:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00066b7c:
if (cVar6 == '\x01') goto LAB_00066b8c;
iVar4 = *(int *)(param_1 + 0x4bf4);
}
}
else {
iVar4 = *(int *)(param_1 + 0x4bf4);
}
uVar10 = Status;
if (iVar4 << 0xc < 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) != 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
LAB_00066cb4:
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa4b46;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
uVar3 = 0x46;
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x84b46;
}
uVar3 = 0x46;
}
LAB_00067010:
*(undefined1 *)(param_1 + 0x4b14) = uVar3;
if (iVar4 == 100) goto LAB_00067024;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00067070;
}
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 != 100) goto code_r0x00066d10;
goto LAB_00067024;
}
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
do {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa4b46;
uVar3 = 0x46;
}
else {
uVar3 = 0x46;
}
LAB_00066e84:
*(undefined1 *)(param_1 + 0x4b14) = uVar3;
if (iVar4 == 100) goto LAB_00066e98;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00066ebc;
}
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00066e98;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
} while( true );
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) {
uVar3 = 0x50;
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa4b50;
uVar3 = 0x50;
}
goto LAB_00066e84;
}
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) break;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
LAB_00066e98:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x4b);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00066ebc:
if (cVar6 == '\x01') {
LAB_00067080:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa4b50;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
uVar3 = 0x50;
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x84b50;
}
uVar3 = 0x50;
}
goto LAB_00067010;
}
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) break;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
LAB_00067024:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x4b);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00067070:
if (cVar6 == '\x01') goto LAB_00067080;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x132c) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x132c) & 0xfffffff9 | 2;
uVar10 = *(uint *)(param_1 + 0x4bf4);
}
else {
uVar10 = *(uint *)(param_1 + 0x4bf4);
}
if ((uVar10 & 0xf0) == 0x10) {
uVar8 = 0x50f01;
}
else {
uVar8 = 0x50f05;
}
goto LAB_000670dc;
}
if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064324;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa3e00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b07) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064348;
}
LAB_00064324:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3e);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00064348:
if (cVar6 == '\x01') {
LAB_00064584:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064528;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa3e00;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x83e00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b07) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064574;
}
LAB_00064528:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3e);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00064574:
if (cVar6 == '\x01') goto LAB_00064584;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000646e4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa3f00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b08) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064708;
}
LAB_000646e4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3f);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00064708:
if (cVar6 == '\x01') {
LAB_00064944:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000648e8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa3f00;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x83f00;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b08) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064934;
}
LAB_000648e8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x3f);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00064934:
if (cVar6 == '\x01') goto LAB_00064944;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064aa4;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0x37 - uVar10 & 0xff | 0xa4000;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b09) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064ac8;
}
LAB_00064aa4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x40);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00064ac8:
if (cVar6 == '\x01') {
LAB_00064d04:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064ca8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
bVar2 = *(byte *)(param_1 + 0x4be0);
if (bVar2 < 0xf) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e4);
}
else if (bVar2 < 0x41) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e5);
}
else if (bVar2 < 0x81) {
uVar10 = (uint)*(byte *)(param_1 + 0x50e6);
}
else {
uVar10 = (uint)*(byte *)(param_1 + 0x50e7);
}
uVar10 = 0x37 - uVar10 & 0xff;
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0xa4000;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 | 0x84000;
}
bVar2 = *(byte *)(param_1 + 0x4be0);
}
else {
bVar2 = *(byte *)(param_1 + 0x4be0);
}
if (bVar2 < 0xf) {
cVar6 = *(char *)(param_1 + 0x50e4) //possible issue identified - semgrep
}
else if (bVar2 < 0x41) {
cVar6 = *(char *)(param_1 + 0x50e5) //possible issue identified - semgrep
}
else if (bVar2 < 0x81) {
cVar6 = *(char *)(param_1 + 0x50e6) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0x50e7) //possible issue identified - semgrep
}
*(char *)(param_1 + 0x4b09) = '7' - cVar6;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00064cf4;
}
LAB_00064ca8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x40);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00064cf4:
if (cVar6 == '\x01') goto LAB_00064d04;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064de8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa5600;
}
*(undefined1 *)(param_1 + 0x4b1f) = 0;
if (iVar4 != 100) goto LAB_00064e08;
LAB_00064de8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x56);
LAB_00064e08:
if (*(char *)(param_1 + 0xad) == '\x01') {
LAB_00064fc4:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
iVar4 = *(int *)(param_1 + 0x4bf4);
}
else {
iVar4 = *(int *)(param_1 + 0x4bf4);
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00064f68;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa5600;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if ((iVar5 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x85600;
}
*(undefined1 *)(param_1 + 0x4b1f) = 0;
if (iVar4 != 100) goto LAB_00064fb0;
LAB_00064f68:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x56);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
LAB_00064fb0:
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
if (cVar6 == '\x01') goto LAB_00064fc4;
iVar4 = *(int *)(param_1 + 0x4bf4);
}
}
else {
iVar4 = *(int *)(param_1 + 0x4bf4);
}
uVar10 = Status;
if (iVar4 << 0xd < 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000650c0;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa5262;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0x62;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000650e4;
}
LAB_000650c0:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000650e4:
if (cVar6 == '\x01') {
LAB_000652a8:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_0006524c;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa5262;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if ((iVar5 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x85262;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0x62;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065298;
}
LAB_0006524c:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00065298:
if (cVar6 == '\x01') goto LAB_000652a8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) != 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
LAB_000653c4:
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa4b46;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
uVar3 = 0x46;
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x84b46;
}
uVar3 = 0x46;
}
LAB_000659f8:
*(undefined1 *)(param_1 + 0x4b14) = uVar3;
if (iVar4 == 100) goto LAB_00065a0c;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065a58;
}
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 != 100) goto code_r0x00065420;
goto LAB_00065a0c;
}
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
do {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa4b46;
uVar3 = 0x46;
}
else {
uVar3 = 0x46;
}
LAB_0006586c:
*(undefined1 *)(param_1 + 0x4b14) = uVar3;
if (iVar4 == 100) goto LAB_00065880;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000658a4;
}
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00065880;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
} while( true );
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
if (*(char *)(param_1 + 0xec) == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) break;
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_000655a8;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa5284;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0x84;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000655cc;
}
LAB_000655a8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000655cc:
if (cVar6 == '\x01') {
LAB_00065790:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) break;
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) goto LAB_00065734;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa5284;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
if ((iVar5 == 0) && (*(char *)(param_1 + 0xec) == '\0')) {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x85284;
}
*(undefined1 *)(param_1 + 0x4b1b) = 0x84;
if (iVar4 != 100) {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00065780;
}
LAB_00065734:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x52);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00065780:
if (cVar6 == '\x01') goto LAB_00065790;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar10 = Status;
if (cVar6 == '\0') {
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar10 & 0x20000) == 0) {
uVar3 = 0x50;
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa4b50;
uVar3 = 0x50;
}
goto LAB_0006586c;
}
iVar4 = iVar4 + 1;
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) break;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
LAB_00065880:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x4b);
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000658a4:
if (cVar6 == '\x01') {
LAB_00065a68:
Status = Status & 0xfffffffe;
if (uVar8 != 0) {
Status = Status | 1;
}
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
uVar8 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar8 = uVar10 & 1;
}
iVar4 = 1;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
while( true ) {
uVar10 = 0;
if (cVar6 == '\0') {
uVar10 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x7028);
}
if ((uVar10 & 0x20000) == 0) {
if (cVar6 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa4b50;
}
iVar5 = AsicSendCommandToMcuBBP(param_1,0x80,0xff,0,0,0);
if (*(char *)(param_1 + 0x16964) == '\x01') {
RTMPusecDelay(1000);
}
uVar3 = 0x50;
if (iVar5 == 0) {
if (*(char *)(param_1 + 0xec) == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0x84b50;
}
uVar3 = 0x50;
}
goto LAB_000659f8;
}
iVar5 = iVar4 % 0x14;
iVar4 = iVar4 + 1;
if ((iVar5 == 0) && (cVar6 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar10 & 0xfffdffff;
}
printk(&_LC19) //possible issue identified - semgrep
if (iVar4 == 100) break;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
LAB_00065a0c:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x4b);
if (*(char *)(param_1 + 0xec) == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) & 0xfffdffff;
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
LAB_00065a58:
if (cVar6 == '\x01') goto LAB_00065a68;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x132c) =
*(uint *)(*(int *)(param_1 + 0xdc) + 0x132c) & 0xfffffff9 | 4;
uVar10 = *(uint *)(param_1 + 0x4bf4);
}
else {
uVar10 = *(uint *)(param_1 + 0x4bf4);
}
if ((uVar10 & 0xf0) == 0x10) {
uVar8 = 0x50f02;
}
else {
uVar8 = 0x50f0a;
}
LAB_000670dc:
if ((uVar10 & 0xf) == 1) {
uVar8 = uVar8 & 0xfffff3ff;
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
else {
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar6 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x1328) = uVar8;
}
if (param_3 == '\0') {
cVar9 = AsicRxAntEvalTimeout[param_1 + 5];
}
else {
cVar9 = (code)0x0;
}
RTMPSetAGCInitValue(param_1,cVar9);
RTMPusecDelay(1000);
return;
code_r0x00066d10:
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
goto LAB_00066cb4;
code_r0x00065420:
cVar6 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
goto LAB_000653c4;
}