user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<archive_extract>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xab0,%rsp
  mov    %rdi,-0xa98(%rbp)
  mov    %rsi,-0xaa0(%rbp)
  mov    %rdx,-0xaa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xa98(%rbp),%rdx
  lea    -0xa90(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0xa90(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_make_absolute@plt>
  mov    -0xaa0(%rbp),%rdx
  lea    -0x490(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <wfile_basespec@plt>
  lea    -0x890(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_abstmpnam@plt>
  lea    -0x890(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_makedir@plt>
  mov    $0x0,%eax
  call   <wfile_get_wd@plt>
  mov    %rax,%rdx
  lea    -0x690(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x890(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_set_wd@plt>
  mov    -0xa98(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_ext@plt>
  mov    %eax,%edx
  lea    D38(%rip),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <stricmp@plt>
  test   %eax,%eax
  jne    L3
  mov    -0xaa0(%rbp),%rcx
  lea    -0xa90(%rbp),%rdx
  lea    -0x290(%rbp),%rax
  lea    D22(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L21
L3:
  mov    -0xaa0(%rbp),%rcx
  lea    -0xa90(%rbp),%rdx
  lea    -0x290(%rbp),%rax
  lea    D18(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L21:
  lea    -0x290(%rbp),%rax
  mov    %rax,%rdi
  call   <system@plt>
  lea    -0x690(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_set_wd@plt>
  lea    -0x490(%rbp),%rdx
  lea    -0x890(%rbp),%rcx
  mov    -0xaa8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <wfile_fullname@plt>
  mov    -0xaa8(%rbp),%rax
  mov    %rax,%rdi
  call   <wfile_status@plt>
  cmp    $0x1,%eax
  je     L25
  lea    -0x290(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xa,%edi
  call   <exit@plt>
L25:
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L2
  call   <__stack_chk_fail@plt>
L2:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D38
datatype: string
name: parse_data
arguments: data_tag: D22
datatype: string
name: parse_data
arguments: data_tag: D18
datatype: string
name: parse_data
arguments: data_tag: D2
datatype: string

tool: D38: 7z

tool: D22: 7z -r e "%s" "%s" 1> nul 2> nul

tool: D18: unzip -o -j "%s" "%s" 1> nul 2> nul

tool: D2: Internal error executing command '%s'!


assistant: ```c
int archive_extract(char *archfile, char *file_to_extract, char *tempname) {
  char archname_full[512];
  char tempdir[512];
  char cwd[512];
  char basefile[512];
  char cmd[512 + 128];
  strcpy(archname_full, archfile);
  wfile_make_absolute(archname_full);
  wfile_basespec(basefile, file_to_extract);
  wfile_abstmpnam(tempdir);
  wfile_makedir(tempdir);
  strcpy(cwd, wfile_get_wd());
  wfile_set_wd(tempdir);
  if (!stricmp(wfile_ext(archfile), "7z"))
    sprintf(cmd, "7z -r e \"%s\" \"%s\" 1> nul 2> nul", archname_full, file_to_extract);
  else
    sprintf(cmd, "unzip -o -j \"%s\" \"%s\" 1> nul 2> nul", archname_full, file_to_extract);
  system(cmd);
  wfile_set_wd(cwd);
  wfile_fullname(tempname, tempdir, basefile);
  if (wfile_status(tempname) != 1) {
    printf("Internal error executing command '%s'!\n", cmd);
    exit(10);
  }
  return (1);
}
```