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

```asm
<run_tests>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    (%rdi),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L43
  lea    0x30(%rsp),%rax
  xor    %r13d,%r13d
  mov    %rdi,%r15
  xor    %r14d,%r14d
  mov    %rax,0x18(%rsp)
  lea    0x2c(%rsp),%rax
  mov    %r13d,%ebx
  movl   $0x0,0xc(%rsp)
  mov    %rax,0x10(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L4:
  add    $0x1,%ebx
  mov    %r14d,%edi
  call   <writeout_test@plt>
  movslq %ebx,%rbp
  shl    $0x3,%rbp
  lea    (%r15,%rbp,1),%r12
  mov    %r12,%rdi
  call   <dupargv@plt>
  cmpq   $0x0,(%r12)
  movl   $0x0,0x2c(%rsp)
  mov    %rax,0x30(%rsp)
  je     L27
  lea    -0x8(%r15,%rbp,1),%rdx
  mov    $0x1,%eax
L194:
  mov    %eax,%ebp
  add    $0x1,%rax
  cmpq   $0x0,(%rdx,%rax,8)
  jne    L194
  mov    %ebp,0x2c(%rsp)
  add    $0x1,%ebp
L23:
  lea    (%rbx,%rbp,1),%eax
  mov    %eax,0x4(%rsp)
  cltq
  lea    (%r15,%rax,8),%rdi
  mov    $0x1,%eax
  cmpq   $0x0,(%rdi)
  je     L54
L205:
  mov    %eax,%ebx
  add    $0x1,%rax
  cmpq   $0x0,-0x8(%rdi,%rax,8)
  jne    L205
  lea    0x1(%rbx),%eax
  mov    %eax,0x8(%rsp)
  call   <dupargv@plt>
  mov    0x2c(%rsp),%edx
  mov    %rax,%r12
  test   %edx,%edx
  jle    L38
L105:
  xor    %r13d,%r13d
  nopl   0x0(%rax,%rax,1)
L176:
  mov    0x30(%rsp),%rax
  mov    (%rax,%r13,8),%rdi
  add    $0x1,%r13
  call   <run_replaces@plt>
  cmp    %r13d,0x2c(%rsp)
  jg     L176
  test   %ebx,%ebx
  je     L30
L38:
  lea    -0x1(%rbx),%eax
  mov    %r12,%rbp
  lea    0x8(%r12,%rax,8),%r13
  nopl   0x0(%rax)
L111:
  mov    0x0(%rbp),%rdi
  add    $0x8,%rbp
  call   <run_replaces@plt>
  cmp    %rbp,%r13
  jne    L111
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <expandargv@plt>
  cmp    0x2c(%rsp),%ebx
  je     L47
L165:
  mov    %r14d,%esi
  lea    D30(%rip),%rdi
  call   <printf@plt>
L136:
  addl   $0x1,0xc(%rsp)
L77:
  mov    0x30(%rsp),%rdi
  call   <freeargv@plt>
  mov    %r12,%rdi
  call   <freeargv@plt>
  mov    0x8(%rsp),%ebx
  mov    %r14d,%edi
  add    0x4(%rsp),%ebx
  call   <erase_test@plt>
  movslq %ebx,%rax
  add    $0x1,%r14d
  mov    (%r15,%rax,8),%rsi
  test   %rsi,%rsi
  jne    L4
L169:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L157
  mov    0xc(%rsp),%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L47:
  shl    $0x3,%rbx
  xor    %r13d,%r13d
  xor    %ebp,%ebp
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L94:
  add    $0x8,%r13
  cmp    %r13,%rbx
  je     L67
L106:
  mov    (%r12,%r13,1),%rdi
  call   <strlen@plt>
  mov    (%r12,%r13,1),%rsi
  mov    %eax,%edx
  mov    0x30(%rsp),%rax
  mov    (%rax,%r13,1),%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L94
  mov    %r14d,%esi
  lea    D34(%rip),%rdi
  add    $0x8,%r13
  add    $0x1,%ebp
  call   <printf@plt>
  cmp    %r13,%rbx
  jne    L106
L67:
  test   %ebp,%ebp
  jne    L136
  mov    %r14d,%esi
  lea    D31(%rip),%rdi
  call   <printf@plt>
  jmp    L77
  nopw   0x0(%rax,%rax,1)
L54:
  call   <dupargv@plt>
  mov    0x2c(%rsp),%ecx
  xor    %ebx,%ebx
  movl   $0x1,0x8(%rsp)
  mov    %rax,%r12
  test   %ecx,%ecx
  jg     L105
  cs nopw 0x0(%rax,%rax,1)
L30:
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <expandargv@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jne    L165
  mov    %r14d,%esi
  lea    D31(%rip),%rdi
  call   <printf@plt>
  jmp    L77
  nop
L27:
  mov    $0x1,%ebp
  jmp    L23
L43:
  movl   $0x0,0xc(%rsp)
  jmp    L169
L157:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D30
type: string
name: extract_symbolic_data
arguments: label: D34
type: string
name: extract_symbolic_data
arguments: label: D31
type: string

tool: D30: FAIL: test-expandargv-%d. Number of arguments don't match.


tool: D34: FAIL: test-expandargv-%d. Arguments don't match.


tool: D31: PASS: test-expandargv-%d.


assistant: ```c
int run_tests(const char **test_data) {
  int argc_after, argc_before;
  char **argv_before, **argv_after;
  int i, j, k, fails, failed;
  i = j = fails = 0;
  while (test_data[j]) {
    writeout_test(i, test_data[j++]);
    argv_before = dupargv((char **)&test_data[j]);
    argc_before = 0;
    argc_after = 0;
    while (test_data[j + argc_before])
      argc_before++;
    j += argc_before + 1;
    while (test_data[j + argc_after])
      argc_after++;
    argv_after = dupargv((char **)&test_data[j]);
    for (k = 0; k < argc_before; k++)
      run_replaces(argv_before[k]);
    for (k = 0; k < argc_after; k++)
      run_replaces(argv_after[k]);
    expandargv(&argc_before, &argv_before);
    failed = 0;
    if (argc_before != argc_after) {
      printf("FAIL: test-expandargv-%d. Number of arguments don't match.\n", i);
      failed++;
    } else
      for (k = 0; k < argc_after; k++)
        if (strncmp(argv_before[k], argv_after[k], strlen(argv_after[k])) != 0) {
          printf("FAIL: test-expandargv-%d. Arguments don't match.\n", i);
          failed++;
        }
    if (!failed)
      printf("PASS: test-expandargv-%d.\n", i);
    else
      fails++;
    freeargv(argv_before);
    freeargv(argv_after);
    j += argc_after + 1;
    erase_test(i);
    i++;
  }
  return fails;
}
```