user: What would the C source look like for the assembly code provided here:

```asm
<replace>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  call   <countStrStr@plt>
  mov    %rbp,%rdi
  mov    %eax,%r15d
  call   <strlen@plt>
  mov    %rbx,%rdi
  mov    %eax,0x4(%rsp)
  call   <strlen@plt>
  mov    %r13,%rdi
  mov    %eax,%r12d
  call   <strlen@plt>
  mov    %rbp,%r9
  mov    %eax,%r14d
  cmp    %eax,%r12d
  jne    L229
  mov    0x4(%rsp),%r11d
  sub    %r12d,%r11d
  js     L94
L73:
  mov    %r14d,%eax
  lea    -0x1(%r14),%esi
  xor    %r10d,%r10d
  xor    %edi,%edi
  shr    $0x4,%eax
  mov    %esi,0x8(%rsp)
  sub    $0x1,%eax
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,%r8
  mov    %r14d,%eax
  and    $0xfffffff0,%eax
  mov    %eax,0x1c(%rsp)
  lea    0x1(%r13),%rax
  mov    %rax,0x10(%rsp)
  mov    %esi,%eax
  lea    0x1(%r12),%esi
  mov    %rax,0x28(%rsp)
  mov    %r14d,%eax
  and    $0xf,%eax
  mov    %eax,0x20(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x24(%rsp)
  lea    -0x1(%r12),%eax
  mov    %eax,0x18(%rsp)
  nopl   0x0(%rax)
L418:
  movslq %edi,%r15
  mov    $0x1,%eax
  xor    %ecx,%ecx
  lea    0x0(%rbp,%r15,1),%rdx
  test   %r12d,%r12d
  jg     L253
  jmp    L334
  nopl   0x0(%rax)
L97:
  mov    %eax,%ecx
  add    $0x1,%rax
  cmp    %rsi,%rax
  je     L334
L253:
  movzbl -0x1(%rbx,%rax,1),%ecx
  cmp    %cl,-0x1(%rax,%rdx,1)
  je     L97
L189:
  movzbl 0x0(%rbp,%r15,1),%edx
  movslq %r10d,%rax
  mov    %dl,(%r9,%rax,1)
L211:
  add    $0x1,%edi
  add    $0x1,%r10d
  cmp    %r11d,%edi
  jle    L418
  movslq %r10d,%rax
  add    %r9,%rax
L172:
  mov    0x4(%rsp),%edi
  add    $0x1,%r11d
  cmp    %r11d,%edi
  jle    L447
  movslq %edi,%rbx
  movslq %r10d,%rdx
  lea    -0x2(%r12),%ecx
  movslq %r12d,%rax
  mov    %rbx,%rdi
  lea    (%r9,%rdx,1),%rsi
  sub    %rax,%rdi
  mov    %rsi,%r13
  lea    0x2(%rbp,%rdi,1),%r14
  sub    %r14,%r13
  cmp    $0xe,%r13
  jbe    L91
  cmp    $0x6,%ecx
  jbe    L91
  lea    -0x1(%r12),%edx
  cmp    $0xe,%ecx
  jbe    L315
  mov    %edx,%ecx
  lea    0x1(%rbp,%rdi,1),%rbx
  xor    %eax,%eax
  shr    $0x4,%ecx
  shl    $0x4,%rcx
  xchg   %ax,%ax
L87:
  movdqu (%rbx,%rax,1),%xmm2
  movups %xmm2,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L87
  mov    %edx,%eax
  and    $0xfffffff0,%eax
  add    %eax,%r11d
  lea    (%r10,%rax,1),%ecx
  cmp    %eax,%edx
  je     L135
  sub    %eax,%r12d
  lea    -0x1(%r12),%ebx
  sub    $0x2,%r12d
  cmp    $0x6,%r12d
  jbe    L393
L217:
  add    %rbp,%rdi
  mov    0x1(%rax,%rdi,1),%rdi
  mov    %rdi,(%rsi,%rax,1)
  mov    %ebx,%eax
  and    $0xfffffff8,%eax
  add    %eax,%r11d
  add    %eax,%ecx
  cmp    %eax,%ebx
  je     L135
L393:
  movslq %r11d,%rax
  mov    0x4(%rsp),%ebx
  movzbl 0x0(%rbp,%rax,1),%esi
  movslq %ecx,%rax
  mov    %sil,(%r9,%rax,1)
  lea    0x1(%r11),%eax
  lea    0x1(%rcx),%esi
  cmp    %ebx,%eax
  jge    L135
  cltq
  movzbl 0x0(%rbp,%rax,1),%edi
  movslq %esi,%rax
  lea    0x2(%rcx),%esi
  mov    %dil,(%r9,%rax,1)
  lea    0x2(%r11),%eax
  cmp    %eax,%ebx
  jle    L135
  cltq
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %al,(%r9,%rsi,1)
  lea    0x3(%r11),%eax
  lea    0x3(%rcx),%esi
  cmp    %eax,%ebx
  jle    L135
  cltq
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %al,(%r9,%rsi,1)
  lea    0x4(%r11),%eax
  lea    0x4(%rcx),%esi
  cmp    %eax,%ebx
  jle    L135
  cltq
  movslq %esi,%rsi
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %al,(%r9,%rsi,1)
  lea    0x5(%r11),%eax
  lea    0x5(%rcx),%esi
  cmp    %eax,%ebx
  jle    L135
  cltq
  add    $0x6,%r11d
  add    $0x6,%ecx
  movzbl 0x0(%rbp,%rax,1),%edi
  movslq %esi,%rax
  mov    %dil,(%r9,%rax,1)
  cmp    %r11d,%ebx
  jle    L135
  movslq %r11d,%r11
  movslq %ecx,%rcx
  movzbl 0x0(%rbp,%r11,1),%eax
  mov    %al,(%r9,%rcx,1)
L135:
  lea    (%rdx,%r10,1),%eax
  cltq
  add    %r9,%rax
L447:
  movb   $0x0,(%rax)
L358:
  add    $0x38,%rsp
  mov    %r9,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L334:
  movslq %edi,%r15
  cmp    %ecx,%r12d
  jne    L189
  test   %r14d,%r14d
  jle    L329
  movslq %r10d,%rax
  add    %r9,%rax
  mov    %rax,%rdx
  sub    0x10(%rsp),%rdx
  cmp    $0xe,%rdx
  jbe    L120
  mov    0x8(%rsp),%edx
  cmp    $0x6,%edx
  jbe    L120
  cmp    $0xe,%edx
  jbe    L205
  xor    %edx,%edx
  nopl   (%rax)
L244:
  movdqu 0x0(%r13,%rdx,1),%xmm1
  movups %xmm1,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdx,%r8
  jne    L244
  mov    0x1c(%rsp),%edx
  cmp    %edx,%r14d
  je     L329
  cmpl   $0x6,0x24(%rsp)
  mov    0x20(%rsp),%r15d
  mov    %edx,%ecx
  jbe    L111
L179:
  movq   0x0(%r13,%rcx,1),%xmm0
  movq   %xmm0,(%rax,%rcx,1)
  mov    %r15d,%eax
  and    $0xfffffff8,%eax
  add    %eax,%edx
  cmp    %eax,%r15d
  je     L329
L111:
  movslq %edx,%rax
  movzbl 0x0(%r13,%rax,1),%ecx
  lea    (%r10,%rdx,1),%eax
  cltq
  mov    %cl,(%r9,%rax,1)
  lea    0x1(%rdx),%eax
  cmp    %eax,%r14d
  jle    L329
  movslq %eax,%rcx
  add    %r10d,%eax
  movzbl 0x0(%r13,%rcx,1),%ecx
  cltq
  mov    %cl,(%r9,%rax,1)
  lea    0x2(%rdx),%eax
  cmp    %eax,%r14d
  jle    L329
  movslq %eax,%rcx
  add    %r10d,%eax
  movzbl 0x0(%r13,%rcx,1),%ecx
  cltq
  mov    %cl,(%r9,%rax,1)
  lea    0x3(%rdx),%eax
  cmp    %eax,%r14d
  jle    L329
  movslq %eax,%rcx
  add    %r10d,%eax
  movzbl 0x0(%r13,%rcx,1),%ecx
  cltq
  mov    %cl,(%r9,%rax,1)
  lea    0x4(%rdx),%eax
  cmp    %eax,%r14d
  jle    L329
  movslq %eax,%rcx
  add    %r10d,%eax
  movzbl 0x0(%r13,%rcx,1),%ecx
  cltq
  mov    %cl,(%r9,%rax,1)
  lea    0x5(%rdx),%eax
  cmp    %eax,%r14d
  jle    L329
  movslq %eax,%rcx
  add    %r10d,%eax
  add    $0x6,%edx
  movzbl 0x0(%r13,%rcx,1),%ecx
  cltq
  mov    %cl,(%r9,%rax,1)
  cmp    %edx,%r14d
  jle    L329
  movslq %edx,%rax
  add    %r10d,%edx
  movzbl 0x0(%r13,%rax,1),%eax
  movslq %edx,%rdx
  mov    %al,(%r9,%rdx,1)
L329:
  add    0x18(%rsp),%edi
  add    0x8(%rsp),%r10d
  jmp    L211
L229:
  mov    %eax,%edi
  sub    %r12d,%edi
  imul   %edi,%r15d
  add    0x4(%rsp),%r15d
  mov    %r15d,%edi
  call   <malloc@plt>
  mov    %rax,%r9
  test   %rax,%rax
  je     L358
  mov    %r15d,%edx
  xor    %esi,%esi
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  call   <memset@plt>
  mov    0x4(%rsp),%r11d
  mov    0x8(%rsp),%r9
  sub    %r12d,%r11d
  jns    L73
L94:
  mov    %r9,%rax
  xor    %r10d,%r10d
  jmp    L172
L120:
  mov    0x28(%rsp),%r15
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L395:
  movzbl 0x0(%r13,%rdx,1),%ecx
  mov    %cl,(%rax,%rdx,1)
  mov    %rdx,%rcx
  add    $0x1,%rdx
  cmp    %r15,%rcx
  jne    L395
  add    0x18(%rsp),%edi
  add    0x8(%rsp),%r10d
  jmp    L211
L91:
  sub    %rbx,%rax
  mov    0x4(%rsp),%ecx
  movslq %r11d,%r11
  add    %rdx,%rax
  add    %r9,%rax
  nopl   0x0(%rax,%rax,1)
L72:
  movzbl 0x0(%rbp,%r11,1),%edx
  mov    %dl,-0x1(%rax,%r11,1)
  add    $0x1,%r11
  cmp    %r11d,%ecx
  jg     L72
  lea    -0x1(%r12),%edx
  jmp    L135
L205:
  mov    %r14d,%r15d
  xor    %ecx,%ecx
  xor    %edx,%edx
  jmp    L179
L315:
  mov    %edx,%ebx
  mov    %r10d,%ecx
  xor    %eax,%eax
  jmp    L217
```

assistant: ```c
char *replace(char *line, char *pattern, char *replace) {
  int i, j, k, llen, plen, rlen, count;
  char *newline;
  count = countStrStr(line, pattern);
  llen = strlen(line);
  plen = strlen(pattern);
  rlen = strlen(replace);
  if (rlen != plen) {
    newline = malloc(llen + count * (rlen - plen));
    if (!newline) {
      return NULL;
    }
    memset(newline, 0, llen + count * (rlen - plen));
  } else {
    newline = line;
  }
  for (i = 0, k = 0; i <= llen - plen; i++, k++) {
    for (j = 0; j < plen; j++) {
      if (line[i + j] != pattern[j]) {
        break;
      }
    }
    if (j == plen) {
      for (j = 0; j < rlen; j++) {
        newline[k + j] = replace[j];
      }
      i += plen - 1;
      k += rlen - 1;
      count++;
    } else {
      newline[k] = line[i];
    }
  }
  for (i = llen - plen + 1; i < llen; i++, k++) {
    newline[k] = line[i];
  }
  newline[k] = '\0';
  return newline;
}
```