user: What is the c source code of the assembly code below:

```asm
<lace_compat_string_byte_translate>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x238,%rsp
  movsbl (%rsi),%r13d
  mov    %rcx,(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  test   %r13b,%r13b
  jne    L129
  jmp    L126
  nopl   0x0(%rax,%rax,1)
L96:
  mov    %r13d,%r13d
  mov    %al,0x20(%rsp,%r13,1)
  lea    0x1(%r15),%eax
  mov    %r15b,0x120(%rsp,%r13,1)
  movsbl (%r12,%rax,1),%r13d
  mov    %rax,%r15
  test   %r13b,%r13b
  je     L126
L129:
  mov    (%r14,%rax,8),%rdi
  call   <strlen@plt>
  cmp    $0xff,%rax
  jbe    L96
  xor    %r15d,%r15d
L82:
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L107
  add    $0x238,%rsp
  mov    %r15,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L126:
  cmpq   $0x0,(%rsp)
  je     L66
  mov    (%rsp),%rdi
  call   <strlen@plt>
  mov    0x10(%rsp),%rdi
  mov    %rax,%r13
  test   %rdi,%rdi
  je     L57
L29:
  call   <strlen@plt>
  mov    %rax,0x18(%rsp)
  add    $0x1,%rax
  mov    %rax,0x8(%rsp)
L76:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %r13,%r15
  call   <strcspn@plt>
  movzbl 0x0(%rbp,%rax,1),%ecx
  mov    %rax,%rdx
  test   %cl,%cl
  je     L137
  nopw   0x0(%rax,%rax,1)
L39:
  movsbl %cl,%ecx
  add    %r15,%rax
  lea    0x1(%rdx),%rbx
  mov    %r12,%rsi
  movzbl 0x20(%rsp,%rcx,1),%r15d
  lea    0x0(%rbp,%rbx,1),%rdi
  add    %rax,%r15
  call   <strcspn@plt>
  lea    (%rbx,%rax,1),%rdx
  movzbl 0x0(%rbp,%rdx,1),%ecx
  test   %cl,%cl
  jne    L39
L137:
  lea    (%r15,%rax,1),%rdi
  add    0x8(%rsp),%rdi
  call   <malloc@plt>
  mov    (%rsp),%rsi
  mov    %r13,%rdx
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <memcpy@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcspn@plt>
  mov    %rax,%rcx
  movzbl 0x0(%rbp,%rax,1),%eax
  test   %al,%al
  je     L7
  mov    %rcx,%rdx
  mov    %rbp,%r8
  xchg   %ax,%ax
L4:
  movsbl %al,%ebx
  lea    (%r15,%r13,1),%rdi
  mov    %r8,%rsi
  mov    %rcx,0x8(%rsp)
  mov    %rdx,(%rsp)
  call   <memcpy@plt>
  mov    (%rsp),%rdx
  movzbl 0x120(%rsp,%rbx,1),%eax
  movzbl 0x20(%rsp,%rbx,1),%r8d
  add    %rdx,%r13
  mov    (%r14,%rax,8),%rsi
  mov    %r8,%rdx
  lea    (%r15,%r13,1),%rdi
  mov    %r8,(%rsp)
  call   <memcpy@plt>
  mov    0x8(%rsp),%rcx
  mov    (%rsp),%r8
  mov    %r12,%rsi
  lea    0x1(%rcx),%rbx
  add    %r8,%r13
  lea    0x0(%rbp,%rbx,1),%r8
  mov    %r8,%rdi
  mov    %r8,0x8(%rsp)
  mov    %r8,(%rsp)
  call   <strcspn@plt>
  mov    (%rsp),%r8
  lea    (%rbx,%rax,1),%rcx
  mov    %rax,%rdx
  movzbl 0x0(%rbp,%rcx,1),%eax
  test   %al,%al
  jne    L4
L47:
  mov    0x8(%rsp),%rsi
  lea    (%r15,%r13,1),%rdi
  mov    %rdx,(%rsp)
  call   <memcpy@plt>
  mov    (%rsp),%rdx
  mov    0x18(%rsp),%rbx
  mov    0x10(%rsp),%rsi
  add    %rdx,%r13
  mov    %rbx,%rdx
  add    %r15,%r13
  mov    %r13,%rdi
  call   <memcpy@plt>
  movb   $0x0,0x0(%r13,%rbx,1)
  jmp    L82
  nopw   0x0(%rax,%rax,1)
L66:
  mov    0x10(%rsp),%rdi
  lea    D10(%rip),%rax
  xor    %r13d,%r13d
  mov    %rax,(%rsp)
  test   %rdi,%rdi
  jne    L29
L57:
  movq   $0x1,0x8(%rsp)
  lea    D10(%rip),%rax
  movq   $0x0,0x18(%rsp)
  mov    %rax,0x10(%rsp)
  jmp    L76
L7:
  mov    %rbp,0x8(%rsp)
  mov    %rcx,%rdx
  jmp    L47
L107:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D10
datatype: string

tool: 

assistant: ```c
char *lace_compat_string_byte_translate(const char *haystack, const char *needles, const char *const *replacements, const char *lhs, const char *rhs) {
  unsigned char replacement_length_lut[256];
  unsigned char replacement_index_lut[256];
  size_t lhs_length, rhs_length;
  char *dst;
  size_t offset;
  {
    unsigned i;
    for (i = 0; needles[i] != '\0'; ++i) {
      size_t n = strlen(replacements[i]);
      const unsigned needle = (unsigned)needles[i];
      if (n >= 256) {
        return NULL;
      }
      replacement_length_lut[needle] = (unsigned char)n;
      replacement_index_lut[needle] = (unsigned char)i;
    }
    if (!lhs) {
      lhs = "";
    }
    if (!rhs) {
      rhs = "";
    }
    lhs_length = strlen(lhs);
    rhs_length = strlen(rhs);
  }
  {
    size_t n;
    size_t i = 0;
    offset = lhs_length;
    for (n = strcspn(haystack, needles); haystack[i + n] != '\0'; n = strcspn(&haystack[i], needles)) {
      const unsigned needle = (unsigned)haystack[i + n];
      offset += n + replacement_length_lut[needle];
      i += n + 1;
    }
    offset += n + rhs_length;
  }
  dst = (char *)malloc(offset + 1);
  {
    size_t n;
    size_t i = 0;
    offset = lhs_length;
    memcpy(dst, lhs, lhs_length);
    for (n = strcspn(haystack, needles); haystack[i + n] != '\0'; n = strcspn(&haystack[i], needles)) {
      const unsigned needle = (unsigned)haystack[i + n];
      memcpy(&dst[offset], &haystack[i], n);
      memcpy(&dst[offset + n], replacements[replacement_index_lut[needle]], replacement_length_lut[needle]);
      i += n + 1;
      offset += n + replacement_length_lut[needle];
    }
    memcpy(&dst[offset], &haystack[i], n);
    offset += n;
    memcpy(&dst[offset], rhs, rhs_length);
    offset += rhs_length;
    dst[offset] = '\0';
  }
  return dst;
}
```