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

```asm
<dump_prov_ies>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %esi,-0x12c(%rbp)
  mov    %rdx,-0x138(%rbp)
  mov    %ecx,-0x130(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x130(%rbp)
  jle    L36
  mov    -0x128(%rbp),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    %eax,-0x12c(%rbp)
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rax,-0x128(%rbp)
  jmp    L18
L24:
  mov    -0x138(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x11c(%rbp)
  mov    -0x138(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x130(%rbp)
  jg     L21
  mov    -0x118(%rbp),%eax
  lea    0x2(%rax),%edx
  mov    -0x130(%rbp),%ecx
  lea    -0x110(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  lea    D5(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    -0x12c(%rbp),%eax
  lea    -0x1(%rax),%edx
  lea    -0x110(%rbp),%rcx
  mov    -0x128(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    %eax,-0x12c(%rbp)
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rax,-0x128(%rbp)
  jmp    L32
L21:
  movl   $0x0,-0x114(%rbp)
  cmpl   $0x0,-0x114(%rbp)
  jne    L77
  mov    -0x11c(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D16(%rip),%rdx
  mov    $0x100,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    -0x12c(%rbp),%eax
  lea    -0x1(%rax),%edx
  lea    -0x110(%rbp),%rcx
  mov    -0x128(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    %eax,-0x12c(%rbp)
  mov    -0x128(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %rax,-0x128(%rbp)
L77:
  mov    -0x118(%rbp),%eax
  add    $0x2,%eax
  cltq
  add    %rax,-0x138(%rbp)
  mov    -0x118(%rbp),%eax
  add    $0x2,%eax
  sub    %eax,-0x130(%rbp)
L18:
  cmpl   $0x2,-0x130(%rbp)
  jg     L24
  jmp    L32
L36:
  nop
L32:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D2
datatype: string
name: read_data
arguments: data_tag: D5
datatype: string
name: read_data
arguments: data_tag: D16
datatype: string

tool: D2: 


tool: D5: Total Prov IE length of %d bytes exceeds remaining prov frame length of %d bytes


tool: D16:        Unknown Prov IE %03d  : Present


assistant: ```c
void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int len) {
  int ielen;
  int ie;
  int found;
  char tmp[256];
  if (len < 2)
    return;
  strcpy(output, "\n");
  maxlen -= (int)strlen(output);
  output += strlen(output);
  while (len > 2) {
    ie = iedata[0];
    ielen = iedata[1];
    if (ielen + 2 > len) {
      snprintf(tmp, (int)sizeof(tmp), "Total Prov IE length of %d bytes exceeds remaining prov frame length of %d bytes\n", ielen + 2, len);
      strncpy(output, tmp, maxlen - 1);
      maxlen -= (int)strlen(output);
      output += strlen(output);
      return;
    }
    found = 0;
    if (!found) {
      snprintf(tmp, (int)sizeof(tmp), "       Unknown Prov IE %03d  : Present\n", ie);
      strncpy(output, tmp, maxlen - 1);
      maxlen -= (int)strlen(output);
      output += strlen(output);
    }
    iedata += (2 + ielen);
    len -= (2 + ielen);
  }
}
```