user: 请将以下的汇编代码转换成C语言代码：

```asm
<dir_media_check>:
  endbr64
  push   %r13
  lea    D45(%rip),%rcx
  lea    D53(%rip),%rdx
  mov    %rsi,%r13
  push   %r12
  movq   %rcx,%xmm0
  lea    D69(%rip),%rcx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  lea    D167(%rip),%rax
  mov    %rsp,%rbx
  lea    0x80(%rsp),%r12
  movq   %rax,%xmm1
  lea    D39(%rip),%rax
  punpcklqdq %xmm1,%xmm0
  movq   %rax,%xmm2
  lea    D165(%rip),%rax
  movaps %xmm0,(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm3
  lea    D59(%rip),%rdx
  punpcklqdq %xmm2,%xmm0
  lea    D73(%rip),%rax
  movaps %xmm0,0x10(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm4
  lea    D153(%rip),%rcx
  punpcklqdq %xmm3,%xmm0
  lea    D144(%rip),%rax
  movaps %xmm0,0x20(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm5
  lea    D155(%rip),%rdx
  punpcklqdq %xmm4,%xmm0
  lea    D123(%rip),%rax
  movaps %xmm0,0x30(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm6
  lea    D126(%rip),%rcx
  punpcklqdq %xmm5,%xmm0
  lea    D111(%rip),%rax
  movaps %xmm0,0x40(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm7
  lea    D128(%rip),%rdx
  punpcklqdq %xmm6,%xmm0
  lea    D41(%rip),%rax
  movaps %xmm0,0x50(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm1
  punpcklqdq %xmm7,%xmm0
  movaps %xmm0,0x60(%rsp)
  movq   %rdx,%xmm0
  punpcklqdq %xmm1,%xmm0
  movaps %xmm0,0x70(%rsp)
  nopw   0x0(%rax,%rax,1)
L8:
  mov    (%rbx),%rdi
  mov    %rbp,%rsi
  call   <dir_get@plt>
  test   %eax,%eax
  jg     L39
  add    $0x8,%rbx
  cmp    %rbx,%r12
  jne    L8
  mov    $0xffffffff,%eax
L16:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L42
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  xchg   %ax,%ax
L39:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x0(%rbp,%rax,1)
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <opendir@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L50
  call   <closedir@plt>
  mov    $0x1,%eax
  jmp    L16
L50:
  mov    %rbp,%rsi
  lea    D79(%rip),%rdi
  call   <printf@plt>
  mov    $0x1ed,%esi
  mov    %rbp,%rdi
  call   <mkdir@plt>
  mov    $0xfffffffe,%eax
  jmp    L16
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D45
type_guessed: string
name: extract_symbolic_data
arguments: label: D53
type_guessed: string
name: extract_symbolic_data
arguments: label: D69
type_guessed: string
name: extract_symbolic_data
arguments: label: D167
type_guessed: string
name: extract_symbolic_data
arguments: label: D39
type_guessed: string
name: extract_symbolic_data
arguments: label: D165
type_guessed: string
name: extract_symbolic_data
arguments: label: D59
type_guessed: string
name: extract_symbolic_data
arguments: label: D73
type_guessed: string
name: extract_symbolic_data
arguments: label: D153
type_guessed: string
name: extract_symbolic_data
arguments: label: D144
type_guessed: string
name: extract_symbolic_data
arguments: label: D155
type_guessed: string
name: extract_symbolic_data
arguments: label: D123
type_guessed: string
name: extract_symbolic_data
arguments: label: D126
type_guessed: string
name: extract_symbolic_data
arguments: label: D111
type_guessed: string
name: extract_symbolic_data
arguments: label: D128
type_guessed: string
name: extract_symbolic_data
arguments: label: D41
type_guessed: string
name: extract_symbolic_data
arguments: label: D79
type_guessed: string

tool: D45: sda1

tool: D53: sda3

tool: D69: sdb1

tool: D167: sda2

tool: D39: sda4

tool: D165: sdb2

tool: D59: sdb3

tool: D73: sdb4

tool: D153: sdc1

tool: D144: sdc2

tool: D155: sdc3

tool: D123: sdc4

tool: D126: sdd1

tool: D111: sdd2

tool: D128: sdd3

tool: D41: sdd4

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