user: 请将以下的汇编代码转换成C语言代码：

```asm
<proc_get_jiffies_stat>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %edi,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  lea    D8(%rip),%rsi
  lea    D43(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L41
L80:
  lea    0x60(%rsp),%rdi
  mov    %rbp,%rdx
  mov    $0x80,%esi
  call   <fgets@plt>
  test   %eax,%eax
  je     L28
  lea    0x60(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0xf5,%eax
  jg     L28
  mov    $0x0,%ebx
  lea    D38(%rip),%r13
  jmp    L18
L41:
  lea    D22(%rip),%rdi
  call   <perror@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L80
L59:
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jb     L138
L18:
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L138
  lea    0x60(%rsp),%rdi
  mov    %rbp,%rdx
  mov    $0x80,%esi
  call   <fgets@plt>
  test   %eax,%eax
  je     L28
  lea    0x60(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0xf5,%eax
  jg     L28
  cmp    %ebx,%r12d
  jne    L59
  lea    0x8(%rsp),%rcx
  lea    0x5a(%rsp),%rdx
  lea    0x60(%rsp),%rdi
  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
  mov    %r13,%rsi
  call   <sscanf@plt>
  add    $0x40,%rsp
  mov    %rbp,%rdi
  call   <fclose@plt>
  jmp    L59
L138:
  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>
  mov    %rax,%rbx
  add    $0x40,%rsp
  test   %rax,%rax
  jne    L53
  lea    D45(%rip),%rdi
  call   <perror@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L53
L28:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    $0x0,%ebx
L53:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L91
  mov    %rbx,%rax
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L91:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
data_type: string
name: extract_symbolic_data
arguments: data_label: D43
data_type: string
name: extract_symbolic_data
arguments: data_label: D38
data_type: string
name: extract_symbolic_data
arguments: data_label: D22
data_type: string
name: extract_symbolic_data
arguments: data_label: D45
data_type: string

tool: D8: r

tool: D43: /proc/stat

tool: D38: %s%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld

tool: D22: fopen:

tool: D45: error 

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;
}
```