undefined4 process_running(int param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
char *__nptr;
undefined4 uVar6;
char acStack_60 [68];
sprintf(acStack_60,"/proc/%d/stat",param_1) //possible issue identified - semgrep
iVar1 = xs_fopen(acStack_60,&DAT_0040a0dc) //possible issue identified - semgrep
if (iVar1 == 0) {
return 0;
}
iVar2 = sobj_new();
iVar3 = sobj_new();
iVar4 = sobj_new();
if ((((iVar2 != 0) && (iVar3 != 0)) && (iVar4 != 0)) &&
((iVar5 = sobj_xstream_read(iVar1,iVar2,0,0), -1 < iVar5 && //possible issue identified - semgrep
(iVar5 = sobj_xstream_read(iVar1,iVar3,0,0), -1 < iVar5)))) { //possible issue identified - semgrep
iVar5 = sobj_xstream_read(iVar1,iVar4,0,0) //possible issue identified - semgrep
uVar6 = 0;
if (iVar5 < 0) goto LAB_00401b48;
__nptr = (char *)sobj_get_string(iVar2);
iVar5 = atoi(__nptr);
uVar6 = 1;
if (param_1 == iVar5) goto LAB_00401b48;
}
uVar6 = 0;
LAB_00401b48:
xs_close(iVar1);
if (iVar2 != 0) {
sobj_del(iVar2);
}
if (iVar3 != 0) {
sobj_del(iVar3);
}
if (iVar4 != 0) {
sobj_del(iVar4);
}
return uVar6;
}