user: 这段汇编代码用C语言表示是什么样的:

```asm
<strsub>:
  endbr64
  push   %r15
  mov    $0xff,%ecx
  mov    %rdi,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x848,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x838(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rbp
  test   %rsi,%rsi
  mov    %rbp,%rdi
  rep stos %rax,%es:(%rdi)
  sete   %al
  test   %rdx,%rdx
  sete   %dl
  or     %dl,%al
  jne    L34
  test   %r15,%r15
  je     L34
  mov    %rsi,%r12
  mov    %r15,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,0x20(%rsp)
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %r14,%rdi
  mov    %eax,0x8(%rsp)
  mov    %eax,%r13d
  call   <strlen@plt>
  mov    %eax,0x10(%rsp)
  cmp    %r13d,%ebx
  jl     L34
  mov    %r14,0x18(%rsp)
  mov    %r15,%rdi
  xor    %ebx,%ebx
  jmp    L341
  nopl   0x0(%rax)
L424:
  mov    %r12,%rdi
  call   <strlen@plt>
  cltq
  lea    (%r14,%rax,1),%rdi
L341:
  mov    %r12,%rsi
  mov    %ebx,%r13d
  call   <strstr@plt>
  mov    %rax,0x0(%rbp,%rbx,8)
  mov    %rax,%r14
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L424
  mov    0x18(%rsp),%r14
  mov    %r13d,%ebx
  test   %r13d,%r13d
  je     L34
  mov    0x10(%rsp),%edi
  sub    0x8(%rsp),%edi
  imul   %r13d,%edi
  add    0x20(%rsp),%edi
  call   <malloc@plt>
  mov    %rax,0x20(%rsp)
  test   %rax,%rax
  je     L34
  movslq 0x8(%rsp),%rax
  mov    0x10(%rsp),%r10d
  lea    0x1(%r14),%rsi
  mov    %rsi,0x18(%rsp)
  mov    0x0(%rbp),%rsi
  mov    %rax,0x8(%rsp)
  mov    %ebx,%eax
  mov    %r10d,%r9d
  lea    -0x1(%r10),%r13d
  sub    $0x1,%eax
  and    $0xfffffff0,%r9d
  mov    %r13,%r12
  lea    0x48(%rsp,%rax,8),%rax
  mov    %r9d,0x38(%rsp)
  mov    %rax,0x10(%rsp)
  mov    %r10d,%eax
  shr    $0x4,%eax
  lea    -0x1(%rax),%r11d
  mov    %r9d,%eax
  mov    %rax,0x28(%rsp)
  add    %r14,%rax
  add    $0x1,%r11
  mov    %rax,0x30(%rsp)
  mov    %r13d,%eax
  shl    $0x4,%r11
  sub    %r9d,%eax
  mov    %eax,0x3c(%rsp)
  mov    0x20(%rsp),%rax
  cmp    %r15,%rsi
  jbe    L340
  cs nopw 0x0(%rax,%rax,1)
L280:
  mov    %rsi,%rcx
  lea    0x1(%r15),%r8
  mov    %rax,%rdi
  sub    %r15,%rcx
  sub    %r8,%rdi
  lea    -0x1(%rcx),%rdx
  cmp    $0xe,%rdi
  jbe    L322
  cmp    $0x6,%rdx
  jbe    L322
  cmp    $0xe,%rdx
  jbe    L451
  mov    %rcx,%rdi
  xor    %edx,%edx
  and    $0xfffffffffffffff0,%rdi
  nopl   0x0(%rax,%rax,1)
L319:
  movdqu (%r15,%rdx,1),%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdi,%rdx
  jne    L319
  mov    %rcx,%r8
  and    $0xfffffffffffffff0,%r8
  lea    (%r15,%r8,1),%rdx
  lea    (%rax,%r8,1),%rdi
  cmp    %r8,%rcx
  je     L259
  mov    %rcx,%r9
  sub    %r8,%r9
  lea    -0x1(%r9),%rbx
  cmp    $0x6,%rbx
  jbe    L47
L282:
  mov    (%r15,%r8,1),%rbx
  mov    %rbx,(%rax,%r8,1)
  mov    %r9,%r8
  and    $0xfffffffffffffff8,%r8
  add    %r8,%rdx
  add    %r8,%rdi
  cmp    %r9,%r8
  je     L259
L47:
  movzbl (%rdx),%r8d
  mov    %r8b,(%rdi)
  lea    0x1(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x1(%rdx),%r8d
  mov    %r8b,0x1(%rdi)
  lea    0x2(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x2(%rdx),%r8d
  mov    %r8b,0x2(%rdi)
  lea    0x3(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x3(%rdx),%r8d
  mov    %r8b,0x3(%rdi)
  lea    0x4(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x4(%rdx),%r8d
  mov    %r8b,0x4(%rdi)
  lea    0x5(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x5(%rdx),%r8d
  mov    %r8b,0x5(%rdi)
  lea    0x6(%rdx),%r8
  cmp    %r8,%rsi
  jbe    L259
  movzbl 0x6(%rdx),%edx
  mov    %dl,0x6(%rdi)
L259:
  add    %rcx,%rax
L144:
  test   %r10d,%r10d
  je     L71
  mov    %rax,%rdx
  sub    0x18(%rsp),%rdx
  cmp    $0xe,%rdx
  jbe    L234
  cmp    $0x6,%r12d
  jbe    L234
  cmp    $0xe,%r12d
  jbe    L304
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L325:
  movdqu (%r14,%rdx,1),%xmm1
  movups %xmm1,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r11,%rdx
  jne    L325
  mov    0x28(%rsp),%rbx
  lea    (%rax,%rbx,1),%rcx
  mov    0x38(%rsp),%ebx
  cmp    %ebx,%r10d
  je     L162
  mov    0x3c(%rsp),%r8d
  mov    0x30(%rsp),%rdi
  mov    %ebx,%edx
L40:
  mov    %r10d,%r9d
  sub    %edx,%r9d
  lea    -0x1(%r9),%ebx
  cmp    $0x6,%ebx
  jbe    L415
  mov    (%r14,%rdx,1),%rbx
  mov    %rbx,(%rax,%rdx,1)
  mov    %r9d,%edx
  and    $0xfffffff8,%edx
  mov    %edx,%ebx
  sub    %edx,%r8d
  add    %rbx,%rcx
  add    %rbx,%rdi
  cmp    %edx,%r9d
  je     L162
L415:
  movzbl (%rdi),%edx
  mov    %dl,(%rcx)
  test   %r8d,%r8d
  je     L162
  movzbl 0x1(%rdi),%edx
  mov    %dl,0x1(%rcx)
  cmp    $0x1,%r8d
  je     L162
  movzbl 0x2(%rdi),%edx
  mov    %dl,0x2(%rcx)
  cmp    $0x2,%r8d
  je     L162
  movzbl 0x3(%rdi),%edx
  mov    %dl,0x3(%rcx)
  cmp    $0x3,%r8d
  je     L162
  movzbl 0x4(%rdi),%edx
  mov    %dl,0x4(%rcx)
  cmp    $0x4,%r8d
  je     L162
  movzbl 0x5(%rdi),%edx
  mov    %dl,0x5(%rcx)
  cmp    $0x5,%r8d
  je     L162
  movzbl 0x6(%rdi),%edx
  mov    %dl,0x6(%rcx)
L162:
  lea    0x1(%rax,%r13,1),%rax
L71:
  mov    0x8(%rsp),%rbx
  add    $0x8,%rbp
  lea    (%rsi,%rbx,1),%r15
  cmp    0x10(%rsp),%rbp
  je     L445
  mov    0x0(%rbp),%rsi
  cmp    %r15,%rsi
  ja     L280
L340:
  mov    %r15,%rsi
  jmp    L144
  nopw   0x0(%rax,%rax,1)
L34:
  movq   $0x0,0x20(%rsp)
L238:
  mov    0x838(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L439
  mov    0x20(%rsp),%rax
  add    $0x848,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L176:
  mov    %dl,(%rax)
  add    $0x1,%rax
  add    $0x1,%r15
L445:
  movzbl (%r15),%edx
  test   %dl,%dl
  jne    L176
  movb   $0x0,(%rax)
  jmp    L238
  nopw   0x0(%rax,%rax,1)
L234:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L17:
  movzbl (%r14,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  mov    %rdx,%rcx
  add    $0x1,%rdx
  cmp    %rcx,%r13
  jne    L17
  jmp    L162
  nopl   0x0(%rax)
L322:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L29:
  movzbl (%r15,%rdx,1),%edi
  mov    %dil,(%rax,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  jne    L29
  jmp    L259
L451:
  mov    %rcx,%r9
  mov    %rax,%rdi
  mov    %r15,%rdx
  xor    %r8d,%r8d
  jmp    L282
L304:
  mov    %r12d,%r8d
  mov    %r14,%rdi
  mov    %rax,%rcx
  xor    %edx,%edx
  jmp    L40
L439:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *strsub(char *str, char *old, char *new) {
  int tl, ol, nl, sl, i = 0, j;
  char *gs[255] = {
      NULL,
  };
  char *sp = str;
  char *tn;
  char *tnp;
  if (str == NULL || old == NULL || new == NULL)
    return NULL;
  sl = strlen(str);
  ol = strlen(old);
  nl = strlen(new);
  if (sl < ol)
    return NULL;
  while (gs[i] = strstr(sp, old))
    sp = gs[i++] + strlen(old);
  if (i == 0)
    return NULL;
  tl = sl + i * (nl - ol);
  tn = (char *)malloc(tl);
  if (tn == NULL)
    return NULL;
  sp = str;
  tnp = tn;
  j = 0;
  while (j < i) {
    int tmp = nl;
    char *np = new;
    while (sp < gs[j])
      *tnp++ = *sp++;
    while (tmp--)
      *tnp++ = *np++;
    sp = sp + ol;
    j++;
  }
  while (*sp != '\0')
    *tnp++ = *sp++;
  *tnp = '\0';
  return tn;
}
```