user: 下面的汇编指令对应的C源代码是什么:

```asm
<get_diskstats_dev_nr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  lea    D28(%rip),%rsi
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  lea    D12(%rip),%rdi
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1a8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L12
  mov    %rax,%r15
  xor    %r12d,%r12d
  lea    0xa0(%rsp),%rbx
  test   %ebp,%ebp
  jne    L81
  jmp    L82
  nopl   (%rax)
L27:
  add    $0x1,%r12d
L81:
  mov    %r15,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L27
L88:
  mov    %r15,%rdi
  call   <fclose@plt>
L84:
  mov    0x1a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x1b8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L82:
  test   %r13d,%r13d
  lea    0x18(%rsp),%r14
  lea    0x10(%rsp),%r13
  lea    D35(%rip),%rbp
  jne    L92
L55:
  mov    %r15,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L88
  lea    0x20(%rsp),%r10
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    %r10,%rdx
  mov    %rbx,%rdi
  mov    %r10,0x8(%rsp)
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L55
  mov    0x8(%rsp),%rsi
  mov    $0x1,%edx
  lea    D33(%rip),%rdi
  call   <is_device@plt>
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r12d
  jmp    L55
  nopl   (%rax)
L116:
  mov    0x10(%rsp),%rax
  or     0x18(%rsp),%rax
  cmp    $0x1,%rax
  sbb    $0xffffffff,%r12d
  nopw   0x0(%rax,%rax,1)
L92:
  mov    %r15,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L88
  lea    0x20(%rsp),%r10
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    %r10,%rdx
  mov    %rbx,%rdi
  mov    %r10,0x8(%rsp)
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L92
  mov    0x8(%rsp),%rsi
  mov    $0x1,%edx
  lea    D33(%rip),%rdi
  call   <is_device@plt>
  test   %eax,%eax
  jne    L116
  jmp    L92
L12:
  xor    %r12d,%r12d
  jmp    L84
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D28
datatype: string
name: disassemble_data
arguments: tag: D12
datatype: string
name: disassemble_data
arguments: tag: D35
datatype: string
name: disassemble_data
arguments: tag: D33
datatype: string

tool: D28: r

tool: D12: /proc/diskstats

tool: D35: %*d %*d %s %lu %*u %*u %*u %lu

tool: D33: /sys

assistant: ```c
int get_diskstats_dev_nr(int count_part, int only_used_dev) {
  FILE *fp;
  char line[256];
  char dev_name[128];
  int dev = 0;
  int i;
  unsigned long rd_ios, wr_ios;
  if ((fp = fopen(""
                  "/proc/"
                  "diskstats",
                  "r")) == NULL)
    return 0;
  while (fgets(line, sizeof(line), fp) != NULL) {
    if (!count_part) {
      i = sscanf(line, "%*d %*d %s %lu %*u %*u %*u %lu", dev_name, &rd_ios, &wr_ios);
      if ((i == 2) || !is_device(""
                                 "/sys",
                                 dev_name, 1))
        continue;
      if (only_used_dev && !rd_ios && !wr_ios)
        continue;
    }
    dev++;
  }
  fclose(fp);
  return dev;
}
```