user: Demonstrate the C code that generates the assembly output below:

```asm
<QMChange>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %rdx,%r15
  push   %r14
  push   %r13
  mov    %r8d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdx,0x28(%rsp)
  mov    %ecx,0x18(%rsp)
  call   <initialise_client@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %r15,%rdi
  mov    %eax,%r14d
  call   <strlen@plt>
  mov    %eax,0x14(%rsp)
  test   %ebx,%ebx
  je     L17
  test   %r14d,%r14d
  je     L166
  mov    0x18(%rsp),%edi
  mov    $0xffffffff,%eax
  mov    $0x1,%r8d
  test   %edi,%edi
  cmovg  %edi,%eax
  test   %r13d,%r13d
  cmovg  %r13d,%r8d
  mov    %eax,0x18(%rsp)
  test   %ebx,%ebx
  jle    L166
  mov    %ebx,%r15d
  movslq %r14d,%rax
  mov    %ebx,0x30(%rsp)
  mov    %rbp,%rbx
  mov    %rbp,0x38(%rsp)
  mov    %r15d,%r13d
  mov    %r8d,%ebp
  mov    %rax,%r15
  movl   $0x0,0x20(%rsp)
  jmp    L85
  nopl   0x0(%rax)
L44:
  mov    %r13d,%edx
  mov    %rax,%rsi
  sub    %rbx,%rsi
  sub    %r14d,%edx
  lea    (%rax,%r15,1),%rbx
  sub    %esi,%edx
  mov    %edx,%r13d
  test   %edx,%edx
  jle    L21
L85:
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <memstr@plt>
  test   %rax,%rax
  je     L21
  sub    $0x1,%ebp
  test   %ebp,%ebp
  jg     L44
  mov    0x8(%rsp),%rdi
  cmove  %rax,%rdi
  addl   $0x1,0x20(%rsp)
  subl   $0x1,0x18(%rsp)
  mov    %rdi,0x8(%rsp)
  jne    L44
  mov    0x30(%rsp),%ebx
  mov    0x38(%rsp),%rbp
L172:
  mov    0x14(%rsp),%eax
  movslq %r14d,%r15
  sub    %r14d,%eax
  imul   0x20(%rsp),%eax
  lea    0x1(%rbx,%rax,1),%edi
  call   <malloc@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15,0x8(%rsp)
  mov    %rbp,%r15
  mov    %rax,0x18(%rsp)
  mov    %rax,%r13
  movslq 0x14(%rsp),%rax
  mov    %r12,%rbp
  mov    0x20(%rsp),%r12d
  mov    %rax,0x30(%rsp)
  jmp    L89
  nopw   0x0(%rax,%rax,1)
L167:
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jne    L41
L59:
  add    0x8(%rsp),%r15
  sub    %r14d,%ebx
  mov    %r14d,%ecx
  mov    %rbp,%rsi
  mov    %ebx,%edx
  mov    %r15,%rdi
  call   <memstr@plt>
  mov    %rax,%rcx
  sub    $0x1,%r12d
  je     L144
L89:
  sub    %r15,%rcx
  mov    %ecx,%edx
  test   %ecx,%ecx
  je     L167
  mov    %r15,%rsi
  mov    %r13,%rdi
  mov    %rcx,0x20(%rsp)
  call   <memcpy@plt>
  mov    0x20(%rsp),%rcx
  movslq %ecx,%rax
  sub    %ecx,%ebx
  add    %rax,%r13
  add    %rax,%r15
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L59
L41:
  mov    0x14(%rsp),%edx
  mov    0x28(%rsp),%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  add    0x30(%rsp),%r13
  jmp    L59
  xchg   %ax,%ax
L21:
  mov    0x20(%rsp),%edx
  mov    0x30(%rsp),%ebx
  mov    0x38(%rsp),%rbp
  test   %edx,%edx
  jne    L172
L166:
  lea    0x1(%rbx),%edi
  call   <malloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  mov    %rax,0x18(%rsp)
  call   <strcpy@plt>
L23:
  mov    0x18(%rsp),%rax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L144:
  test   %ebx,%ebx
  jne    L3
L102:
  movslq %ebx,%rbx
  movb   $0x0,0x0(%r13,%rbx,1)
  jmp    L23
  nopw   0x0(%rax,%rax,1)
L17:
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <NullString@plt>
  nopl   (%rax)
L3:
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <memcpy@plt>
  jmp    L102
```

assistant: ```c
char *QMChange(char *src, char *old, char *new, int occurrences, int start) {
  int src_len;
  int old_len;
  int new_len;
  int32_t bytes;
  char *start_pos;
  char *new_str;
  int32_t changes;
  char *pos;
  char *p;
  char *q;
  int32_t n;
  initialise_client();
  src_len = strlen(src);
  old_len = strlen(old);
  new_len = strlen(new);
  if (src_len == 0) {
    new_str = NullString();
    return new_str;
  }
  if (old_len == 0)
    goto return_unchanged;
  if (occurrences < 1)
    occurrences = -1;
  if (start < 1)
    start = 1;
  changes = 0;
  bytes = src_len;
  pos = src;
  while (bytes > 0) {
    p = memstr(pos, old, bytes, old_len);
    if (p == NULL)
      break;
    if (--start <= 0) {
      if (start == 0)
        start_pos = p;
      changes++;
      if (--occurrences == 0)
        break;
    }
    bytes -= (p - pos) + old_len;
    pos = p + old_len;
  }
  if (changes == 0)
    goto return_unchanged;
  new_str = (char *)malloc(src_len + changes * (new_len - old_len) + 1);
  q = new_str;
  pos = src;
  bytes = src_len;
  p = start_pos;
  do {
    n = p - pos;
    if (n) {
      memcpy(q, pos, n);
      q += n;
      pos += n;
      bytes -= n;
    }
    if (new_len) {
      memcpy(q, new, new_len);
      q += new_len;
    }
    pos += old_len;
    bytes -= old_len;
    p = memstr(pos, old, bytes, old_len);
  } while (--changes);
  if (bytes)
    memcpy(q, pos, bytes);
  q[bytes] = '\0';
  return new_str;
return_unchanged:
  new_str = (char *)malloc(src_len + 1);
  strcpy(new_str, src);
  return new_str;
}
```