user: Demonstrate the C code that generates the assembly output below:

```asm
<kvp_get_if_name>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  call   <kvp_get_mac_addr@plt>
  mov    %rax,0x18(%rsp)
  test   %rax,%rax
  je     L25
  lea    D11(%rip),%r12
  mov    %r12,%rdi
  call   <opendir@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L25
  lea    0x120(%rsp),%rbx
  mov    %r12,%rcx
  lea    D23(%rip),%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  lea    D19(%rip),%r14
  lea    D30(%rip),%r13
  call   <snprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  cltq
  add    %rbx,%rax
  mov    %rax,0x8(%rsp)
L87:
  mov    %rbp,%rdi
  call   <readdir@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L35
L18:
  mov    0x8(%rsp),%rax
  mov    %rbx,%rdi
  movb   $0x0,(%rax)
  mov    (%r12),%rsi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L87
  lea    0x20(%rsp),%rdi
  mov    %rax,%rdx
  mov    $0x100,%esi
  call   <fgets@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L9
  mov    $0xa,%esi
  mov    %rax,0x10(%rsp)
  call   <strchr@plt>
  mov    0x10(%rsp),%rdi
  test   %rax,%rax
  je     L106
  movb   $0x0,(%rax)
L106:
  mov    0x18(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L32
L9:
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <readdir@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L18
L35:
  mov    %rbp,%rdi
  call   <closedir@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
L54:
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x238,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L25:
  xor    %r12d,%r12d
  jmp    L54
  nopl   (%rax)
L32:
  mov    (%r12),%rdi
  call   <strdup@plt>
  mov    %r15,%rdi
  mov    %rax,%r12
  call   <fclose@plt>
  jmp    L35
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D11
type_infered: string
name: unpack_data
arguments: tag: D23
type_infered: string
name: unpack_data
arguments: tag: D19
type_infered: string
name: unpack_data
arguments: tag: D30
type_infered: string

tool: D11: /sys/class/net/

tool: D23: %s

tool: D19: /address

tool: D30: 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;
}
```