user: What is the c source code of the assembly code below?

```asm
<kvp_get_if_name>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x228,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  call   <kvp_get_mac_addr@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L4
  lea    D21(%rip),%rdi
  call   <opendir@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L46
  lea    0x110(%rsp),%r15
  lea    D21(%rip),%rbx
  mov    %rbx,%rcx
  lea    D18(%rip),%rdx
  mov    $0x100,%esi
  mov    %r15,%rdi
  call   <snprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,%r15
  lea    0x110(%rsp),%r13
  jmp    L15
L118:
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L76
L71:
  mov    %rbp,%rdi
  call   <fclose@plt>
L15:
  mov    %r14,%rdi
  call   <readdir@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L113
  movb   $0x0,(%r15)
  mov    (%rbx),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D13(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D4(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L15
  lea    0x10(%rsp),%rdi
  mov    %rax,%rdx
  mov    $0x100,%esi
  call   <fgets@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L71
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L118
  movb   $0x0,(%rax)
  jmp    L118
L76:
  mov    (%rbx),%rdi
  call   <strdup@plt>
  mov    %rax,%rbx
  mov    %rbp,%rdi
  call   <fclose@plt>
L113:
  mov    %r14,%rdi
  call   <closedir@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
L33:
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L92
  mov    %rbx,%rax
  add    $0x228,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  mov    0x8(%rsp),%rbx
  jmp    L33
L46:
  mov    %rax,%rbx
  jmp    L33
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D21
datatype: string
name: disassemble_data
arguments: label: D18
datatype: string
name: disassemble_data
arguments: label: D13
datatype: string
name: disassemble_data
arguments: label: D4
datatype: string

tool: D21: /sys/class/net/

tool: D18: %s

tool: D13: /address

tool: D4: r

assistant: ```c
char *kvp_get_if_name(char *guid) {
  DIR *dir;
  struct dirent *entry;
  FILE *file;
  char *p, *q, *x;
  char *mac_addr;
  char *if_name = NULL;
  char buf[256];
  char *kvp_net_dir = "/sys/class/net/";
  char dev_id[256];
  mac_addr = kvp_get_mac_addr(guid);
  if (mac_addr == NULL)
    return NULL;
  dir = opendir(kvp_net_dir);
  if (dir == NULL)
    return NULL;
  snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
  q = dev_id + strlen(kvp_net_dir);
  while ((entry = readdir(dir)) != NULL) {
    *q = '\0';
    strcat(dev_id, entry->d_name);
    strcat(dev_id, "/address");
    file = fopen(dev_id, "r");
    if (file == NULL)
      continue;
    p = fgets(buf, sizeof(buf), file);
    if (p) {
      x = strchr(p, '\n');
      if (x)
        *x = '\0';
      if (!strcmp(p, mac_addr)) {
        if_name = strdup(entry->d_name);
        fclose(file);
        break;
      }
    }
    fclose(file);
  }
  closedir(dir);
  free(mac_addr);
  return if_name;
}
```