user: Translate the below assembly code into C programming language:

```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     L138
  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)
L175:
  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     L227
  lea    -0x8(%r15,%rbp,1),%rdx
  mov    $0x1,%eax
L135:
  mov    %eax,%ebp
  add    $0x1,%rax
  cmpq   $0x0,(%rdx,%rax,8)
  jne    L135
  mov    %ebp,0x2c(%rsp)
  add    $0x1,%ebp
L131:
  lea    (%rbx,%rbp,1),%eax
  mov    %eax,0x4(%rsp)
  cltq
  lea    (%r15,%rax,8),%rdi
  mov    $0x1,%eax
  cmpq   $0x0,(%rdi)
  je     L157
L24:
  mov    %eax,%ebx
  add    $0x1,%rax
  cmpq   $0x0,-0x8(%rdi,%rax,8)
  jne    L24
  lea    0x1(%rbx),%eax
  mov    %eax,0x8(%rsp)
  call   <dupargv@plt>
  mov    0x2c(%rsp),%edx
  mov    %rax,%r12
  test   %edx,%edx
  jle    L171
L116:
  xor    %r13d,%r13d
  nopl   0x0(%rax,%rax,1)
L159:
  mov    0x30(%rsp),%rax
  mov    (%rax,%r13,8),%rdi
  add    $0x1,%r13
  call   <run_replaces@plt>
  cmp    %r13d,0x2c(%rsp)
  jg     L159
  test   %ebx,%ebx
  je     L211
L171:
  lea    -0x1(%rbx),%eax
  mov    %r12,%rbp
  lea    0x8(%r12,%rax,8),%r13
  nopl   0x0(%rax)
L69:
  mov    0x0(%rbp),%rdi
  add    $0x8,%rbp
  call   <run_replaces@plt>
  cmp    %rbp,%r13
  jne    L69
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <expandargv@plt>
  cmp    0x2c(%rsp),%ebx
  je     L188
L191:
  mov    %r14d,%esi
  lea    D11(%rip),%rdi
  call   <printf@plt>
L51:
  addl   $0x1,0xc(%rsp)
L42:
  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    L175
L111:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L179
  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)
L188:
  shl    $0x3,%rbx
  xor    %r13d,%r13d
  xor    %ebp,%ebp
  jmp    L181
  nopl   0x0(%rax,%rax,1)
L147:
  add    $0x8,%r13
  cmp    %r13,%rbx
  je     L115
L181:
  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     L147
  mov    %r14d,%esi
  lea    D13(%rip),%rdi
  add    $0x8,%r13
  add    $0x1,%ebp
  call   <printf@plt>
  cmp    %r13,%rbx
  jne    L181
L115:
  test   %ebp,%ebp
  jne    L51
  mov    %r14d,%esi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L157:
  call   <dupargv@plt>
  mov    0x2c(%rsp),%ecx
  xor    %ebx,%ebx
  movl   $0x1,0x8(%rsp)
  mov    %rax,%r12
  test   %ecx,%ecx
  jg     L116
  cs nopw 0x0(%rax,%rax,1)
L211:
  mov    0x18(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <expandargv@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jne    L191
  mov    %r14d,%esi
  lea    D0(%rip),%rdi
  call   <printf@plt>
  jmp    L42
  nop
L227:
  mov    $0x1,%ebp
  jmp    L131
L138:
  movl   $0x0,0xc(%rsp)
  jmp    L111
L179:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D11
datatype: string
name: extract_symbolic_data
arguments: data_label: D13
datatype: string
name: extract_symbolic_data
arguments: data_label: D0
datatype: string

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


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


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