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

```asm
<dir_media_check>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    D159(%rip),%rax
  mov    %rax,(%rsp)
  lea    D154(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D81(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D36(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D155(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D87(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D121(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D169(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D12(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D116(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    D115(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D132(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D64(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D40(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D48(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D167(%rip),%rax
  mov    %rax,0x78(%rsp)
  mov    %rsp,%rbx
  lea    0x80(%rsp),%r12
L51:
  mov    %rbp,%rsi
  mov    (%rbx),%rdi
  call   <dir_get@plt>
  test   %eax,%eax
  jg     L43
  add    $0x8,%rbx
  cmp    %r12,%rbx
  jne    L51
  mov    $0xffffffff,%eax
  jmp    L7
L33:
  mov    %rbp,%rsi
  lea    D162(%rip),%rdi
  call   <printf@plt>
  mov    $0x1ed,%esi
  mov    %rbp,%rdi
  call   <mkdir@plt>
  mov    $0xfffffffe,%eax
  jmp    L7
L43:
  mov    %rbp,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <opendir@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L33
  call   <closedir@plt>
  mov    $0x1,%eax
L7:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L17
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D159
data_type: string
name: unpack_data
arguments: data_label: D154
data_type: string
name: unpack_data
arguments: data_label: D81
data_type: string
name: unpack_data
arguments: data_label: D36
data_type: string
name: unpack_data
arguments: data_label: D155
data_type: string
name: unpack_data
arguments: data_label: D87
data_type: string
name: unpack_data
arguments: data_label: D121
data_type: string
name: unpack_data
arguments: data_label: D169
data_type: string
name: unpack_data
arguments: data_label: D12
data_type: string
name: unpack_data
arguments: data_label: D116
data_type: string
name: unpack_data
arguments: data_label: D115
data_type: string
name: unpack_data
arguments: data_label: D132
data_type: string
name: unpack_data
arguments: data_label: D64
data_type: string
name: unpack_data
arguments: data_label: D40
data_type: string
name: unpack_data
arguments: data_label: D48
data_type: string
name: unpack_data
arguments: data_label: D167
data_type: string
name: unpack_data
arguments: data_label: D162
data_type: string

tool: D159: sda1

tool: D154: sda2

tool: D81: sda3

tool: D36: sda4

tool: D155: sdb1

tool: D87: sdb2

tool: D121: sdb3

tool: D169: sdb4

tool: D12: sdc1

tool: D116: sdc2

tool: D115: sdc3

tool: D132: sdc4

tool: D64: sdd1

tool: D40: sdd2

tool: D48: sdd3

tool: D167: sdd4

tool: D162: Do not find media directory(%s)


assistant: ```c
int dir_media_check(char *path, char *subdir) {
  char *arg[] = {"sda1", "sda2", "sda3", "sda4", "sdb1", "sdb2", "sdb3", "sdb4", "sdc1", "sdc2", "sdc3", "sdc4", "sdd1", "sdd2", "sdd3", "sdd4"};
  DIR *dir;
  int i, found, cnt;
  cnt = (sizeof(arg) / sizeof((arg)[0]));
  for (i = 0; i < cnt; i++) {
    found = dir_get(arg[i], path);
    if (found > 0)
      break;
  }
  if (found > 0) {
    i = strlen(path) - 1;
    path[i] = '\0';
    strcat(path, subdir);
  } else {
    return -1;
  }
  dir = opendir(path);
  if (dir) {
    closedir(dir);
    return 1;
  } else {
    printf("Do not find media directory(%s)\r\n", path);
    mkdir(path, 0755);
    return -2;
  }
}
```