undefined4 Set_RfWrite_Proc(undefined4 param_1,char *param_2)
{
char cVar1;
uint uVar2;
char cVar3;
int iVar4;
int iVar5;
char cVar6;
char *pcVar7;
for (pcVar7 = param_2; *pcVar7 != ':'; pcVar7 = pcVar7 + 1) {
if (*pcVar7 == '\0') {
cVar3 = '\0';
goto LAB_000894b4;
}
}
uVar2 = 0;
do {
cVar3 = *param_2;
iVar4 = (int)cVar3;
iVar5 = uVar2 * 0x10;
if ((byte)(cVar3 + 0x9fU) < 6) {
uVar2 = iVar4 + -0x57 + iVar5;
}
else if ((byte)(cVar3 + 0xbfU) < 6) {
uVar2 = iVar4 + -0x37 + iVar5;
}
else {
if (9 < (byte)(cVar3 - 0x30U)) goto code_r0x0008942c;
uVar2 = iVar4 + -0x30 + iVar5;
}
param_2 = param_2 + 1;
} while( true );
LAB_000894b4:
cVar1 = *param_2;
cVar6 = cVar3 * '\x10';
if ((byte)(cVar1 + 0x9fU) < 6) {
cVar3 = cVar1 + -0x57 + cVar6 //possible issue identified - semgrep
}
else if ((byte)(cVar1 + 0xbfU) < 6) {
cVar3 = cVar1 + -0x37 + cVar6 //possible issue identified - semgrep
}
else {
if (9 < (byte)(cVar1 - 0x30U)) goto code_r0x00089508;
cVar3 = cVar1 + -0x30 + cVar6 //possible issue identified - semgrep
}
param_2 = param_2 + 1;
goto LAB_000894b4;
code_r0x00089508:
uVar2 = 0;
goto LAB_00089518;
code_r0x0008942c:
cVar3 = '\0';
while( true ) {
while( true ) {
while( true ) {
pcVar7 = pcVar7 + 1;
cVar1 = *pcVar7;
cVar6 = cVar3 * '\x10';
if (5 < (byte)(cVar1 + 0x9fU)) break;
cVar3 = cVar1 + -0x57 + cVar6 //possible issue identified - semgrep
}
if (5 < (byte)(cVar1 + 0xbfU)) break;
cVar3 = cVar1 + -0x37 + cVar6 //possible issue identified - semgrep
}
if (9 < (byte)(cVar1 - 0x30U)) break;
cVar3 = cVar1 + -0x30 + cVar6 //possible issue identified - semgrep
}
if (0x1f < uVar2) {
return 0;
}
LAB_00089518:
RT30xxWriteRFRegister(param_1,uVar2 & 0xff,cVar3);
return 1;
}