user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<proc_get_jiffies_stat>:
  endbr64
  push   %r14
  lea    D6(%rip),%rsi
  push   %r13
  mov    %edi,%r13d
  lea    D33(%rip),%rdi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L118
L50:
  lea    0x60(%rsp),%r12
  mov    %rbp,%rdx
  mov    $0x80,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %eax,%eax
  je     L25
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0xf5,%eax
  jg     L25
  xor    %ebx,%ebx
  lea    D11(%rip),%r14
  nopl   0x0(%rax)
L92:
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L80
  mov    %rbp,%rdx
  mov    $0x80,%esi
  mov    %r12,%rdi
  call   <fgets@plt>
  test   %eax,%eax
  je     L25
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0xf5,%eax
  jg     L25
  cmp    %ebx,%r13d
  jne    L26
  lea    0x8(%rsp),%rcx
  lea    0x5a(%rsp),%rdx
  mov    %r12,%rdi
  mov    %r14,%rsi
  sub    $0x8,%rsp
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%rax
  push   %rax
  lea    0x58(%rsp),%r9
  lea    0x50(%rsp),%r8
  call   <sscanf@plt>
  add    $0x40,%rsp
  mov    %rbp,%rdi
  call   <fclose@plt>
L26:
  add    $0x1,%ebx
  cmp    %ebx,%r13d
  jae    L92
L80:
  lea    0x5a(%rsp),%rdi
  sub    $0x8,%rsp
  push   $0x0
  push   $0x0
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  push   0x68(%rsp)
  mov    0x68(%rsp),%r9
  mov    0x60(%rsp),%r8
  mov    0x58(%rsp),%rcx
  mov    0x50(%rsp),%rdx
  mov    0x48(%rsp),%rsi
  call   <cpuusage_set_jiffies_stat@plt>
  add    $0x40,%rsp
  mov    %rax,%r12
  test   %rax,%rax
  jne    L28
  lea    D2(%rip),%rdi
  call   <perror@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L28
L25:
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <fclose@plt>
L28:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L75
  add    $0xf0,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L118:
  lea    D41(%rip),%rdi
  call   <perror@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L50
L75:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
data_type: string
name: extract_symbolic_data
arguments: label: D33
data_type: string
name: extract_symbolic_data
arguments: label: D11
data_type: string
name: extract_symbolic_data
arguments: label: D2
data_type: string
name: extract_symbolic_data
arguments: label: D41
data_type: string

tool: D6: r

tool: D33: /proc/stat

tool: D11: %s%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld

tool: D2: error 

tool: D41: fopen:

assistant: ```c
struct cpuusage_jiffies_stat *proc_get_jiffies_stat(unsigned int cpuid) {
  FILE *fp = NULL;
  char buf[128];
  char cpu[6];
  long int user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice;
  struct cpuusage_jiffies_stat *jiffies_stat = NULL;
  fp = fopen("/proc/stat", "r");
  if (fp == NULL) {
    perror("fopen:");
    exit(0);
  }
  if (!fgets(buf, sizeof(buf), fp)) {
    goto error;
  }
  if (strlen(buf) > (255 - 10)) {
    goto error;
  }
  for (unsigned int id = 0; id <= cpuid && !feof(fp); id++) {
    if (!fgets(buf, sizeof(buf), fp)) {
      goto error;
    }
    if (strlen(buf) > (255 - 10)) {
      goto error;
    }
    if (id != cpuid) {
      continue;
    }
    sscanf(buf, "%s%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld", cpu, &user, &nice, &system, &idle, &iowait, &irq, &softirq, &steal, &guest, &guest_nice);
    fclose(fp);
  }
  if ((jiffies_stat = cpuusage_set_jiffies_stat(cpu, user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice, NULL, NULL)) == NULL) {
    perror("error ");
    exit(-1);
  }
  return jiffies_stat;
error:
  fclose(fp);
  return NULL;
}
```