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

```asm
<TestPutCharIntoArrayEx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8d,%eax
  mov    %r9d,-0x50(%rbp)
  mov    %al,-0x4c(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x20(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  lea    -0x11(%rbp),%rax
  mov    $0x9,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  cmpq   $0x0,-0x48(%rbp)
  je     L10
  cmpl   $0x0,-0x40(%rbp)
  jle    L10
  mov    -0x40(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%edx
  mov    -0x48(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L10:
  movsbl -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L0
  movsbl -0x4c(%rbp),%edi
  jmp    L110
L0:
  mov    $0x2e,%edi
L110:
  movsbl -0x4c(%rbp),%ecx
  mov    -0x48(%rbp),%r8
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x40(%rbp),%esi
  push   %rsi
  mov    %r8,%r9
  mov    %edi,%r8d
  mov    %rax,%rsi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x10,%rsp
  cmpq   $0x0,-0x20(%rbp)
  je     L148
  cmpl   $0x0,-0x40(%rbp)
  jle    L148
  movl   $0x0,-0x2c(%rbp)
  jmp    L153
L178:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x11(%rbp),%rcx
  mov    $0x9,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <BinString@plt>
  mov    %rax,%rcx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  movzbl %al,%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L153:
  mov    -0x2c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L178
L148:
  movsbl -0x4c(%rbp),%edx
  mov    -0x40(%rbp),%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <PutCharIntoArray@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x50(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x50(%rbp)
  jne    L170
  movl   $0x1,-0x28(%rbp)
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x2c(%rbp)
  jmp    L169
L45:
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x11(%rbp),%rcx
  mov    $0x9,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <BinString@plt>
  mov    %rax,%rcx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  movzbl %al,%edx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D64(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x11(%rbp),%rcx
  mov    $0x9,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <BinString@plt>
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L96
  lea    D59(%rip),%rax
  jmp    L113
L96:
  lea    D86(%rip),%rax
L113:
  mov    %rax,%rdi
  call   <puts@plt>
  cmpl   $0x0,-0x28(%rbp)
  je     L76
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L76
  mov    $0x1,%eax
  jmp    L125
L76:
  mov    $0x0,%eax
L125:
  mov    %eax,-0x28(%rbp)
  addl   $0x1,-0x2c(%rbp)
L169:
  mov    -0x2c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L45
  cmpl   $0x0,-0x28(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
L170:
  cmpq   $0x0,-0x20(%rbp)
  je     L163
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movq   $0x0,-0x20(%rbp)
L163:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D66
datatype: string
name: extract_symbolic_data
arguments: tag: D45
datatype: string
name: extract_symbolic_data
arguments: tag: D79
datatype: string
name: extract_symbolic_data
arguments: tag: D54
datatype: string
name: extract_symbolic_data
arguments: tag: D34
datatype: string
name: extract_symbolic_data
arguments: tag: D64
datatype: string
name: extract_symbolic_data
arguments: tag: D73
datatype: string
name: extract_symbolic_data
arguments: tag: D59
datatype: string
name: extract_symbolic_data
arguments: tag: D86
datatype: string

tool: D66: 
[%s:%d]
Put char (0x%02x) '%c' into array (0x%p) of size (%d): {


tool: D45:     [%2d]: (0x%02.2x) "%s"


tool: D79:   }  == %d : expecting %d


tool: D54: Compare resulting array to expected result

tool: D34:        expected                       result

tool: D64:   [%2d]: (0x%02.2x) "%s" == 

tool: D73: (0x%02.2x) "%s" : 

tool: D59: true

tool: D86: false

assistant: ```c
void TestPutCharIntoArrayEx(const char *fname, const int line, char *srcArray, const int sz, char msg, const int result, char *resArray) {
  char *tmpArray = NULL;
  int rc = 0, idx = 0, cmpRes = 0;
  char buf[9];
  memset(buf, 0, sizeof(char) * 9);
  if (srcArray && (sz > 0)) {
    tmpArray = (char *)malloc(sizeof(char) * sz);
    memcpy(tmpArray, srcArray, sz);
  }
  printf("\n[%s:%d]\nPut char (0x%02x) '%c' into array (0x%p) of size (%d): {\n", fname, line, msg, (isprint(msg) ? msg : '.'), srcArray, sz);
  if (tmpArray && (sz >= 1)) {
    for (idx = 0; idx < sz; ++idx) {
      printf("    [%2d]: (0x%02.2x) \"%s\"\n", idx, (((int)tmpArray[idx]) & 0x000000ff), BinString(tmpArray[idx], buf, 9));
    }
  }
  rc = PutCharIntoArray(tmpArray, sz, msg);
  printf("  }  == %d : expecting %d\n", rc, result);
  assert(rc == result);
  if (result == 0) {
    cmpRes = 1;
    printf("Compare resulting array to expected result\n");
    printf("       expected                       result\n");
    for (idx = 0; idx < sz; ++idx) {
      printf("  [%2d]: (0x%02.2x) \"%s\" == ", idx, (((int)resArray[idx]) & 0x000000ff), BinString(resArray[idx], buf, 9));
      printf("(0x%02.2x) \"%s\" : ", (((int)tmpArray[idx]) & 0x000000ff), BinString(tmpArray[idx], buf, 9));
      printf("%s\n", (tmpArray[idx] == resArray[idx] ? "true" : "false"));
      cmpRes = cmpRes && (tmpArray[idx] == resArray[idx]);
    }
    assert(cmpRes != 0);
  }
  if (tmpArray) {
    free(tmpArray);
    tmpArray = NULL;
  }
}
```