/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void FUN_00402e00(undefined4 param_1)
{
char cVar1;
char *pcVar2;
size_t sVar3;
char *__s;
char *__haystack;
int iVar4;
int iVar5;
int iVar6;
uint local_38 [2];
uint *local_30;
local_30 = local_38;
do {
__haystack = (char *)lrgbin_get_line_from_file(param_1,0);
iVar5 = DAT_004220f4;
iVar6 = DAT_004220f0;
if (__haystack == (char *)0x0) {
return;
}
pcVar2 = __haystack;
if (DAT_00422984 == '\0') {
LAB_00402eac:
iVar4 = 0;
pcVar2 = (char *)lrgbin_eatwhite(pcVar2);
sVar3 = strlen(pcVar2);
__s = (char *)malloc(sVar3) //possible issue identified - semgrep
if (__s == (char *)0x0) {
fputs("scut: malloc failed!\n",_stderr);
}
else {
while (((cVar1 = *pcVar2, cVar1 != '\0' && (cVar1 != '\n')) && (0 < iVar5))) {
pcVar2 = pcVar2 + 1;
if ((cVar1 == ' ') || (cVar1 == '\t')) {
if (iVar6 == 1) {
iVar5 = iVar5 + -1;
if (iVar5 == 0) break;
__s[iVar4] = ' ';
iVar4 = iVar4 + 1;
}
else {
iVar6 = iVar6 + -1;
}
pcVar2 = (char *)lrgbin_eatwhite(pcVar2);
}
else if (iVar6 == 1) {
__s[iVar4] = cVar1;
iVar4 = iVar4 + 1;
}
}
__s[iVar4] = '\0';
if (*__s != '\0') {
if (DAT_00422980 != 0) {
local_38[0] = 0;
sscanf(__s,"%u",local_30) //possible issue identified - semgrep
sprintf(__s,"%u",local_38[0] - DAT_00422980 &
-(uint)(local_38[0] - DAT_00422980 <= local_38[0])) //possible issue identified - semgrep
}
puts(__s);
}
}
}
else {
pcVar2 = strstr(__haystack,&DAT_00422984);
if (pcVar2 != (char *)0x0) {
sVar3 = strlen(&DAT_00422984);
pcVar2 = pcVar2 + sVar3;
goto LAB_00402eac;
}
}
free(__haystack);
} while( true );
}