user: 下面的汇编指令对应的C源代码是什么:

```asm
<TestTrim>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    $0x101,%edx
  mov    $0x0,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  lea    D160(%rip),%rdi
  call   <puts@plt>
  lea    D201(%rip),%rdi
  call   <puts@plt>
  lea    D161(%rip),%rdi
  call   <puts@plt>
  lea    D193(%rip),%r12
  mov    %r12,%rsi
  lea    D176(%rip),%r14
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rdi
  call   <TrimSpace@plt>
  mov    %rax,%rdi
  lea    D166(%rip),%r13
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    D51(%rip),%rbx
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D9(%rip),%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    %r15,%rdi
  call   <TrimSpace@plt>
  mov    %rax,%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D180(%rip),%r15
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    %r15,%rdi
  call   <TrimSpace@plt>
  mov    %rax,%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    %r13,%rdi
  call   <TrimSpace@plt>
  mov    %rax,%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D105(%rip),%r13
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    %r13,%rdi
  call   <TrimSpace@plt>
  mov    %rax,%rdi
  lea    D116(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D27(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    $0x64,%esi
  mov    $0x0,%edi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D81(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x100,%ecx
  mov    $0x0,%edx
  mov    %r12,%rdi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D139(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x3,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rdi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D203(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    $0x0,%esi
  lea    D8(%rip),%rdi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D113(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x100,%ecx
  mov    %rbp,%rdx
  mov    $0x64,%esi
  mov    $0x0,%edi
  call   <TrimSpace@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D161(%rip),%rdi
  call   <puts@plt>
  lea    D86(%rip),%rdi
  call   <puts@plt>
  lea    D32(%rip),%rdi
  call   <puts@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D160
type: string
name: retrieve_data
arguments: data_label: D201
type: string
name: retrieve_data
arguments: data_label: D161
type: string
name: retrieve_data
arguments: data_label: D193
type: string
name: retrieve_data
arguments: data_label: D176
type: string
name: retrieve_data
arguments: data_label: D166
type: string
name: retrieve_data
arguments: data_label: D51
type: string
name: retrieve_data
arguments: data_label: D9
type: string
name: retrieve_data
arguments: data_label: D180
type: string
name: retrieve_data
arguments: data_label: D105
type: string
name: retrieve_data
arguments: data_label: D116
type: string
name: retrieve_data
arguments: data_label: D27
type: string
name: retrieve_data
arguments: data_label: D81
type: string
name: retrieve_data
arguments: data_label: D99
type: string
name: retrieve_data
arguments: data_label: D139
type: string
name: retrieve_data
arguments: data_label: D203
type: string
name: retrieve_data
arguments: data_label: D8
type: string
name: retrieve_data
arguments: data_label: D113
type: string
name: retrieve_data
arguments: data_label: D86
type: string
name: retrieve_data
arguments: data_label: D32
type: string

tool: D160: 
----------------------------------------------------------------------------

tool: D201:   Test trim functions

tool: D161: ----------------------------------------------------------------------------

tool: D193:    This is a test str   

tool: D176: Trim start and end spaces of "%s": 

tool: D166: This is a test str

tool: D51: [OK]

tool: D9:    This is a test str

tool: D180: This is a test str   

tool: D105:    ONELONGSTRINGOFJUNK   

tool: D116: ONELONGSTRINGOFJUNK

tool: D27: Attempt to trim NULL string: 

tool: D81: Attempt to trim string with 0 size: 

tool: D99: Attempt to trim string with NULL buffer: 

tool: D139: Attempt to trim string with too small buffer: 

tool: D203: Cannot trim an empty string: 

tool: 

tool: D113: Cannot trim a NULL string: 

tool: D86:   Done.

tool: D32: ----------------------------------------------------------------------------


assistant: ```c
void TestTrim() {
  char buf[256 + 1];
  const char *str1 = "   This is a test str   ";
  const char *str2 = "   This is a test str";
  const char *str3 = "This is a test str   ";
  const char *str4 = "This is a test str";
  const char *rString = "This is a test str";
  memset(buf, 0, 256 + 1);
  printf("\n----------------------------------------------------------------------------\n");
  printf("  Test trim functions\n");
  printf("----------------------------------------------------------------------------\n");
  {
    printf("Trim start and end spaces of \"%s\": ", str1);
    assert(strcmp(TrimSpace(str1, strlen(str1), buf, 256), rString) == 0);
    printf("[OK]\n");
  };
  {
    printf("Trim start and end spaces of \"%s\": ", str2);
    assert(strcmp(TrimSpace(str2, strlen(str2), buf, 256), rString) == 0);
    printf("[OK]\n");
  };
  {
    printf("Trim start and end spaces of \"%s\": ", str3);
    assert(strcmp(TrimSpace(str3, strlen(str3), buf, 256), rString) == 0);
    printf("[OK]\n");
  };
  {
    printf("Trim start and end spaces of \"%s\": ", str4);
    assert(strcmp(TrimSpace(str4, strlen(str4), buf, 256), rString) == 0);
    printf("[OK]\n");
  };
  {
    printf("Trim start and end spaces of \"%s\": ", "   ONELONGSTRINGOFJUNK   ");
    assert(strcmp(TrimSpace("   ONELONGSTRINGOFJUNK   ", strlen("   ONELONGSTRINGOFJUNK   "), buf, 256), "ONELONGSTRINGOFJUNK") == 0);
    printf("[OK]\n");
  };
  printf("\n");
  {
    printf("Attempt to trim NULL string: ");
    assert(TrimSpace(NULL, 100, buf, 256) == NULL);
    printf("[OK]\n");
  };
  {
    printf("Attempt to trim string with 0 size: ");
    assert(TrimSpace(str1, 0, buf, 256) == NULL);
    printf("[OK]\n");
  };
  {
    printf("Attempt to trim string with NULL buffer: ");
    assert(TrimSpace(str1, strlen(str1), NULL, 256) == NULL);
    printf("[OK]\n");
  };
  {
    printf("Attempt to trim string with too small buffer: ");
    assert(TrimSpace(str1, strlen(str1), buf, 3) == NULL);
    printf("[OK]\n");
  };
  {
    printf("Cannot trim an empty string: ");
    assert(TrimSpace("", 0, buf, 256) == NULL);
    printf("[OK]\n");
  };
  {
    printf("Cannot trim a NULL string: ");
    assert(TrimSpace(NULL, 100, buf, 256) == NULL);
    printf("[OK]\n");
  };
  printf("----------------------------------------------------------------------------\n");
  printf("  Done.\n");
  printf("----------------------------------------------------------------------------\n\n");
}
```