undefined4 Set_Hw_Antenna_Div_Proc(int param_1,undefined4 param_2)
{
char cVar1;
int iVar2;
uint uVar3;
uint uVar4;
int iVar5;
undefined4 uVar6;
uint uVar7;
undefined1 uVar8;
byte bVar9;
byte local_38 [8];
uint local_30;
local_30 = simple_strtol(param_2,0,10);
uVar3 = Status;
if (local_30 == 1) {
local_38[0] = 0;
if (2 < RTDebugLevel) {
printk("Set_Hw_Antenna_Div_Proc: enable hardware antenna diversity\n");
}
RT30xxReadRFRegister(param_1,0x1d,local_38);
local_38[0] = local_38[0] & 0x3f | 0xc0;
RT30xxWriteRFRegister(param_1,0x1d,local_38[0]);
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;
}
iVar5 = 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_00034b1c;
}
}
iVar5 = iVar5 + 1;
if (iVar5 == 100) break;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar4 = 0;
LAB_00034b1c:
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_00034cb4:
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;
}
iVar5 = 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_00034c5c;
}
}
iVar5 = iVar5 + 1;
if (iVar5 == 100) break;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar4 = 0;
LAB_00034c5c:
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_00034cb4;
}
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') {
bVar9 = (byte)uVar4 | 0x80;
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar7 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar7 = uVar3 & 1;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00034db0;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar1 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar4 | 0xa2f80;
}
*(byte *)(param_1 + 0x4af8) = bVar9;
if (iVar5 != 100) goto LAB_00034dd0;
LAB_00034db0:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x2f);
LAB_00034dd0:
if (*(char *)(param_1 + 0xad) == '\x01') {
LAB_00034f88:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00034f2c;
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) = bVar9;
if (iVar5 != 100) goto LAB_00034f74;
LAB_00034f2c:
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_00034f74:
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
if (cVar1 == '\x01') goto LAB_00034f88;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035078;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_0003509c;
}
LAB_00035078:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x96);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_0003509c:
if (cVar1 == '\x01') {
LAB_00035260:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035204;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035250;
}
LAB_00035204:
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_00035250:
if (cVar1 == '\x01') goto LAB_00035260;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035350;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035374;
}
LAB_00035350:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x97);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00035374:
if (cVar1 == '\x01') {
LAB_00035538:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000354dc;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035528;
}
LAB_000354dc:
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_00035528:
if (cVar1 == '\x01') goto LAB_00035538;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035628;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_0003564c;
}
LAB_00035628:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x98);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_0003564c:
if (cVar1 == '\x01') {
LAB_00035810:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000357b4;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035800;
}
LAB_000357b4:
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_00035800:
if (cVar1 == '\x01') goto LAB_00035810;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035900;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035924;
}
LAB_00035900:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x99);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00035924:
if (cVar1 == '\x01') {
LAB_00035ae8:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035a8c;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035ad8;
}
LAB_00035a8c:
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_00035ad8:
if (cVar1 == '\x01') goto LAB_00035ae8;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035bd8;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035bfc;
}
LAB_00035bd8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x9a);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00035bfc:
if (cVar1 == '\x01') {
LAB_00035dc0:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035d64;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035db0;
}
LAB_00035d64:
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_00035db0:
if (cVar1 == '\x01') goto LAB_00035dc0;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00035eb0;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00035ed4;
}
LAB_00035eb0:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x9b);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00035ed4:
if (cVar1 == '\x01') {
LAB_00036098:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_0003603c;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00036088;
}
LAB_0003603c:
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_00036088:
if (cVar1 == '\x01') goto LAB_00036098;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar3 = Status;
if (cVar1 != '\0') {
return 1;
}
if (*(int *)(param_1 + 0x29f8) != 4) {
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000362f8;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto joined_r0x00037930;
}
LAB_000362f8:
printk("ERROR!!! ");
uVar6 = 0xfd;
LAB_000378f8:
printk("BBP write R%d fail\n",uVar6);
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
}
goto joined_r0x00037930;
}
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036184;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto joined_r0x00037930;
}
LAB_00036184:
printk("ERROR!!! ");
uVar6 = 0xfd;
}
else {
if (1 < local_30) {
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036400;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00036424;
}
LAB_00036400:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x96);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00036424:
if (cVar1 == '\x01') {
LAB_000365e4:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036588;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000365d4;
}
LAB_00036588:
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_000365d4:
if (cVar1 == '\x01') goto LAB_000365e4;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000366d4;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000366f8;
}
LAB_000366d4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x97);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000366f8:
if (cVar1 == '\x01') {
LAB_000368bc:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036860;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000368ac;
}
LAB_00036860:
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_000368ac:
if (cVar1 == '\x01') goto LAB_000368bc;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000369a0;
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 (iVar5 != 100) goto LAB_000369c0;
LAB_000369a0:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x9a);
LAB_000369c0:
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036b20;
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 (iVar5 != 100) goto LAB_00036b68;
LAB_00036b20:
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_00036b68:
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;
uVar7 = 0xa3;
if (local_30 == 3) {
uVar7 = 0x23;
}
if (*(char *)(param_1 + 0xec) != '\0') {
return 1;
}
uVar8 = (undefined1)uVar7;
if (*(int *)(param_1 + 0x29f8) == 4) {
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 1;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
LAB_00036bf0:
uVar3 = 0;
if (cVar1 == '\0') {
uVar3 = *(uint *)(*(int *)(param_1 + 0xdc) + 0x101c);
}
if ((uVar3 & 0x20000) == 0) {
if (cVar1 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x101c) = uVar7 | 0xa9800;
*(undefined1 *)(param_1 + 0x4b61) = uVar8;
}
else {
*(undefined1 *)(param_1 + 0x4b61) = uVar8;
}
LAB_0003773c:
if (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto joined_r0x00037930;
}
}
else {
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 != 100) goto code_r0x00036c24;
}
goto LAB_0003774c;
}
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036dac;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar1 == '\0') {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar7 | 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) = uVar7 | 0x89800;
}
*(undefined1 *)(param_1 + 0x4b61) = uVar8;
if (iVar5 != 100) goto LAB_00036df4;
LAB_00036dac:
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_00036df4:
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
goto joined_r0x00037930;
}
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00036ee4;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00036f08;
}
LAB_00036ee4:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x96);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_00036f08:
if (cVar1 == '\x01') {
LAB_000370c8:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_0003706c;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000370b8;
}
LAB_0003706c:
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_000370b8:
if (cVar1 == '\x01') goto LAB_000370c8;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000371b8;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_000371dc;
}
LAB_000371b8:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x97);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
LAB_000371dc:
if (cVar1 == '\x01') {
LAB_000373a0:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00037344;
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 (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto LAB_00037390;
}
LAB_00037344:
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_00037390:
if (cVar1 == '\x01') goto LAB_000373a0;
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;
}
iVar5 = 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;
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00037484;
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 (iVar5 != 100) goto LAB_000374a4;
LAB_00037484:
printk("ERROR!!! ");
printk("BBP write R%d fail\n",0x9a);
LAB_000374a4:
if (*(char *)(param_1 + 0xad) == '\x01') {
LAB_00037660:
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;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_00037604;
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 (iVar5 != 100) goto LAB_0003764c;
LAB_00037604:
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_0003764c:
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
else {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
}
if (cVar1 == '\x01') goto LAB_00037660;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
}
else {
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
uVar3 = Status;
if (cVar1 != '\0') {
return 1;
}
if (*(int *)(param_1 + 0x29f8) != 4) {
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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 = iVar5 % 0x14;
iVar5 = iVar5 + 1;
if ((iVar2 == 0) && (cVar1 == '\0')) {
*(uint *)(*(int *)(param_1 + 0xdc) + 0x7028) = uVar3 & 0xfffdffff;
}
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) goto LAB_000378dc;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
if (cVar1 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x7028) = 0xa98a3;
}
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) = 0x898a3;
}
*(undefined1 *)(param_1 + 0x4b61) = 0xa3;
if (iVar5 != 100) {
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
goto joined_r0x00037930;
}
LAB_000378dc:
printk("ERROR!!! ");
uVar6 = 0x98;
goto LAB_000378f8;
}
uVar4 = 0;
if (*(char *)(param_1 + 0xad) == '\x01') {
Status = Status & 0xfffffffe;
uVar4 = uVar3 & 1;
}
iVar5 = 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) {
if (cVar1 == '\0') {
*(undefined4 *)(*(int *)(param_1 + 0xdc) + 0x101c) = 0xa98a3;
}
*(undefined1 *)(param_1 + 0x4b61) = 0xa3;
goto LAB_0003773c;
}
iVar5 = iVar5 + 1;
printk(&_LC49) //possible issue identified - semgrep
if (iVar5 == 100) break;
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
}
LAB_0003774c:
printk("ERROR!!! ");
uVar6 = 0x98;
}
printk("BBP write R%d fail\n",uVar6);
cVar1 = *(char *)(param_1 + 0xad) //possible issue identified - semgrep
joined_r0x00037930:
if ((cVar1 == '\x01') && (Status = Status & 0xfffffffe, uVar4 != 0)) {
Status = Status | 1;
}
return 1;
code_r0x00036c24:
cVar1 = *(char *)(param_1 + 0xec) //possible issue identified - semgrep
goto LAB_00036bf0;
}