/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long mii_read(uint param_1,uint param_2)
{
FILE *pFVar1;
long lVar2;
char acStack_58 [68];
pFVar1 = fopen("/proc/rt3052/mii/ctrl","w") //possible issue identified - semgrep
if (pFVar1 == (FILE *)0x0) {
lVar2 = -1;
fprintf(_stderr,"%s: unable to open file %s to write!\n","mii_read","/proc/rt3052/mii/ctrl");
}
else {
fprintf(pFVar1,"read %d %d",param_1 & 0xff,param_2 & 0xff);
fclose(pFVar1);
pFVar1 = fopen("/proc/rt3052/mii/data","r") //possible issue identified - semgrep
if (pFVar1 == (FILE *)0x0) {
fprintf(_stderr,"%s: unable to open file %s to read!\n","mii_read","/proc/rt3052/mii/data");
lVar2 = -1;
}
else {
fread(acStack_58,1,0x40,pFVar1) //possible issue identified - semgrep
lVar2 = strtol(acStack_58,(char **)0x0,0x10);
fclose(pFVar1);
}
}
return lVar2;
}