user: Converte this assembly snippet into its equivalent C code:

```asm
<findProcess>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x110,%rsp
  mov    %rdi,-0x108(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xf8(%rbp)
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  lea    D10(%rip),%rax
  mov    %rax,%rsi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xe8(%rbp)
  cmpq   $0x0,-0xe8(%rbp)
  jne    L57
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L133
L78:
  mov    -0x108(%rbp),%rdx
  lea    -0xe0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L57
  lea    -0xe0(%rbp),%rax
  mov    $0x5a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L83
  movl   $0x1,-0xf8(%rbp)
  jmp    L30
L83:
  mov    -0xe8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0xffffffff,%eax
  jmp    L133
L57:
  mov    -0xe8(%rbp),%rdx
  lea    -0xe0(%rbp),%rax
  mov    $0x64,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L78
L30:
  mov    -0xe8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <unlink@plt>
  cmpl   $0x0,-0xf8(%rbp)
  je     L37
  movl   $0x0,-0xf4(%rbp)
  movl   $0x0,-0xec(%rbp)
  nop
L64:
  mov    -0xf4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xf4(%rbp)
  cltq
  movzbl -0xe0(%rbp,%rax,1),%eax
  cmp    $0x20,%al
  je     L64
  mov    -0xf4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xf0(%rbp)
L117:
  mov    -0xf0(%rbp),%eax
  cltq
  movzbl -0xe0(%rbp,%rax,1),%eax
  cmp    $0x20,%al
  je     L105
  mov    -0xec(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xec(%rbp)
  mov    -0xf0(%rbp),%edx
  movslq %edx,%rdx
  movzbl -0xe0(%rbp,%rdx,1),%edx
  cltq
  mov    %dl,-0x70(%rbp,%rax,1)
  jmp    L25
L105:
  mov    -0xec(%rbp),%eax
  cltq
  movb   $0x0,-0x70(%rbp,%rax,1)
  nop
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  jmp    L133
L25:
  addl   $0x1,-0xf0(%rbp)
  jmp    L117
L37:
  mov    $0xffffffff,%eax
L133:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L92
  call   <__stack_chk_fail@plt>
L92:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D46
type: string
name: disassemble_data
arguments: data_tag: D10
type: string
name: disassemble_data
arguments: data_tag: D40
type: string
name: disassemble_data
arguments: data_tag: D3
type: string

tool: D46: ps -ax > /tmp/process.tmp

tool: D10: r

tool: D40: /tmp/process.tmp

tool: D3: Unable to open file


assistant: ```c
int findProcess(char *aucString) {
  int bFlag = 0, iCnt, iCnt1, iCnt2;
  char aucBuff[100];
  char aucTemp[100];
  FILE *fp;
  system("ps -ax > /tmp/process.tmp");
  fp = fopen("/tmp/process.tmp", "r");
  if (fp == NULL) {
    printf("Unable to open file\n");
    return -1;
  }
  while (fgets(aucBuff, sizeof(aucBuff), fp) != NULL) {
    if (strstr(aucBuff, aucString) != NULL) {
      if (strstr(aucBuff, "Z") == NULL) {
        bFlag = 1;
        break;
      } else {
        fclose(fp);
        return -1;
      }
    }
  }
  fclose(fp);
  unlink("/tmp/process.tmp");
  if (bFlag) {
    iCnt = 0;
    iCnt2 = 0;
    while (aucBuff[iCnt++] == ' ')
      ;
    for (iCnt1 = iCnt - 1;; iCnt1++) {
      if (aucBuff[iCnt1] != ' ')
        aucTemp[iCnt2++] = aucBuff[iCnt1];
      else {
        aucTemp[iCnt2] = '\0';
        break;
      }
    }
    return (atoi(aucTemp));
  } else
    return -1;
}
```