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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x8c000(%rsp),%r11
L34:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L34
  sub    $0xa48,%rsp
  movdqa D128(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x8ca38(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x8ca10(%rsp)
  mov    $0x2d,%eax
  mov    %rsi,%r13
  movdqa D122(%rip),%xmm0
  lea    0x8ca10(%rsp),%rdi
  lea    D41(%rip),%rsi
  movl   $0x20303030,0x8ca30(%rsp)
  mov    %ax,0x8ca34(%rsp)
  movaps %xmm0,0x8ca20(%rsp)
  call   <popen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L1
L37:
  xor    %ebp,%ebp
  lea    0x10(%rsp),%rbx
  mov    $0x23280,%r12d
  nopl   0x0(%rax)
L82:
  movslq %ebp,%rax
  mov    %r12d,%edx
  mov    %r14,%rcx
  mov    $0x4,%esi
  sub    %ebp,%edx
  lea    (%rbx,%rax,4),%rdi
  call   <fread@plt>
  add    %eax,%ebp
  cmp    $0x2327f,%ebp
  jle    L82
  lea    D8(%rip),%r15
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    0x8(%r13),%rdi
  mov    %eax,%r12d
  call   <strlen@plt>
  lea    D94(%rip),%r9
  mov    %r9,%rdi
  add    %r12d,%eax
  mov    %eax,0x8(%rsp)
  call   <strlen@plt>
  mov    %r15,%rdi
  mov    %eax,%r12d
  call   <strlen@plt>
  mov    0x8(%r13),%rdi
  mov    %eax,%ebp
  call   <strlen@plt>
  lea    D90(%rip),%r8
  mov    %r8,%rdi
  lea    0x0(%rbp,%rax,1),%ecx
  mov    %ecx,0xc(%rsp)
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    0x8(%rsp),%eax
  lea    0x1(%rax,%r12,1),%edi
  call   <malloc@plt>
  mov    0xc(%rsp),%ecx
  mov    %rax,%r12
  lea    0x1(%rcx,%rbp,1),%edi
  call   <malloc@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <strcpy@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  lea    D96(%rip),%r15
  call   <strcpy@plt>
  mov    0x8(%r13),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    0x8(%r13),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D94(%rip),%r9
  mov    %r12,%rdi
  mov    %r9,%rsi
  call   <strcat@plt>
  lea    D90(%rip),%r8
  mov    %rbp,%rdi
  mov    %r8,%rsi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L25
L67:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L0
L18:
  xor    %ebp,%ebp
  lea    D62(%rip),%r15
  nopl   0x0(%rax)
L32:
  mov    (%rbx),%ecx
  mov    %ebp,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebp
  call   <fprintf@plt>
  mov    %rbx,%rdi
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x4,%esi
  add    $0x4,%rbx
  call   <fwrite@plt>
  cmp    $0x23280,%ebp
  jne    L32
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <pclose@plt>
  mov    0x8ca38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L36
  add    $0x8ca48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1:
  lea    D100(%rip),%rdi
  call   <perror@plt>
  jmp    L37
L25:
  lea    D36(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L67
L0:
  lea    D36(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L18
L36:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D128
type_infered: byte[16]
name: retrieve_data
arguments: data_tag: D122
type_infered: byte[16]
name: retrieve_data
arguments: data_tag: D41
type_infered: string
name: retrieve_data
arguments: data_tag: D8
type_infered: string
name: retrieve_data
arguments: data_tag: D94
type_infered: string
name: retrieve_data
arguments: data_tag: D90
type_infered: string
name: retrieve_data
arguments: data_tag: D96
type_infered: string
name: retrieve_data
arguments: data_tag: D62
type_infered: string
name: retrieve_data
arguments: data_tag: D100
type_infered: string
name: retrieve_data
arguments: data_tag: D36
type_infered: string

tool: {"D128": [0x72,0x65,0x63,0x20,0x2d,0x74,0x20,0x72,0x61,0x77,0x20,0x2d,0x62,0x20,0x31,0x36]}

tool: {"D122": [0x20,0x2d,0x63,0x20,0x31,0x20,0x2d,0x65,0x20,0x73,0x20,0x2d,0x72,0x20,0x34,0x38]}

tool: D41: r

tool: D8: data/

tool: D94: .txt

tool: D90: .raw

tool: D96: w

tool: D62: %d %d


tool: D100: rec

tool: D36: fopen

assistant: ```c
int main(int ARGC, char *ARGV[]) {
  FILE *rec;
  char cmd[] = "rec -t raw -b 16 -c 1 -e s -r 48000 -";
  if ((rec = popen(cmd, "r")) == NULL) {
    perror("rec");
  }
  int n = 0;
  int16_t buf[144000];
  while (1) {
    n += fread(buf + n, sizeof(int16_t), 144000 - n, rec);
    if (n >= 144000) {
      break;
    }
  }
  char *text_file_name, *raw_file_name;
  int text_file_name_len = strlen("data/") + strlen(ARGV[1]) + strlen(".txt") + 1;
  int raw_file_name_len = strlen("data/") + strlen(ARGV[1]) + strlen(".raw") + 1;
  text_file_name = (char *)malloc(sizeof(char) * text_file_name_len);
  raw_file_name = (char *)malloc(sizeof(char) * raw_file_name_len);
  strcpy(text_file_name, "data/");
  strcpy(raw_file_name, "data/");
  strcat(text_file_name, ARGV[1]);
  strcat(raw_file_name, ARGV[1]);
  strcat(text_file_name, ".txt");
  strcat(raw_file_name, ".raw");
  FILE *text, *raw;
  if ((text = fopen(text_file_name, "w")) == NULL) {
    perror("fopen");
    exit(1);
  }
  if ((raw = fopen(raw_file_name, "w")) == NULL) {
    perror("fopen");
    exit(1);
  }
  for (int i = 0; i < 144000; i++) {
    fprintf(text, "%d %d\n", i, buf[i]);
    fwrite(&buf[i], sizeof(int16_t), 1, raw);
  }
  fclose(text);
  fclose(raw);
  pclose(rec);
  return 0;
}
```