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

```asm
<string_replace_regex_get_replace>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    %edx,0x2c(%rsp)
  mov    %rcx,%rbx
  mov    %r8b,0x2b(%rsp)
  call   <strlen@plt>
  lea    (%rax,%rax,1),%r13d
  lea    0x1(%r13),%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L260
  movb   $0x0,(%rax)
  movl   $0x0,0x4(%rsp)
  test   %rbx,%rbx
  jne    L107
  jmp    L260
L150:
  movzbl 0x2b(%rsp),%esi
  cmp    %sil,0x1(%rbx)
  jne    L13
  lea    0x1(%rbx),%rax
  mov    %rax,0x8(%rsp)
  add    $0x2,%rbx
  mov    $0x1,%r12d
  jmp    L55
L98:
  movzbl %dil,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L259
  cmpb   $0x2b,0x1(%rbx)
  je     L334
  movzbl 0x2(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L103
  movsbl 0x1(%rbx),%eax
  lea    -0xf0(%rax,%rax,4),%edx
  movsbl 0x2(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%eax
  add    $0x3,%rbx
  jmp    L30
L103:
  movsbl 0x1(%rbx),%eax
  sub    $0x30,%eax
  add    $0x2,%rbx
  jmp    L30
L259:
  cmpb   $0x2e,0x1(%rbx)
  je     L127
L341:
  add    $0x1,%rbx
  jmp    L107
L127:
  movzbl 0x2(%rbx),%ebp
  lea    -0x20(%rbp),%eax
  cmp    $0x5e,%al
  ja     L341
  movzbl 0x3(%rbx),%eax
  cmp    $0x2b,%al
  jne    L165
L246:
  add    $0x4,%rbx
  mov    0x2c(%rsp),%eax
L247:
  cltq
  shl    $0x4,%rax
  add    0x18(%rsp),%rax
  mov    (%rax),%rdx
  test   %rdx,%rdx
  js     L107
  mov    0x8(%rax),%esi
  sub    %edx,%esi
  mov    0x20(%rsp),%rax
  lea    (%rax,%rdx,1),%rdi
  call   <string_strndup@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L107
  mov    %rax,%rdi
  call   <utf8_strlen@plt>
  mov    %eax,%r12d
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L113
  movsbl %bpl,%esi
  mov    %r12d,%edx
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <memset@plt>
  movslq %r12d,%rax
  movb   $0x0,0x0(%rbp,%rax,1)
  mov    %r15,%rdi
  call   <free@plt>
  mov    %rbp,%r15
  jmp    L184
L165:
  movzbl %al,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L341
  movzbl 0x2(%rbx),%ebp
  cmpb   $0x2b,0x3(%rbx)
  je     L246
  movzbl 0x4(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L314
  movsbl 0x3(%rbx),%eax
  lea    -0xf0(%rax,%rax,4),%edx
  movsbl 0x4(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%eax
  add    $0x5,%rbx
  jmp    L247
L314:
  movsbl 0x3(%rbx),%eax
  sub    $0x30,%eax
  add    $0x4,%rbx
  jmp    L247
L254:
  mov    %rbx,%rdi
  call   <utf8_char_size@plt>
  mov    %eax,%r12d
  cltq
  mov    %rbx,0x8(%rsp)
  lea    (%rbx,%rax,1),%rbx
L55:
  mov    $0x0,%r15d
L184:
  mov    0x4(%rsp),%eax
  lea    (%rax,%r12,1),%ebp
  cmp    %r13d,%ebp
  jle    L281
  add    %r13d,%r13d
  cmp    %r13d,%ebp
  cmovge %ebp,%r13d
  lea    0x1(%r13),%esi
  mov    %r14,%rdi
  call   <realloc@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L152
  mov    0x10(%rsp),%r14
L281:
  movslq 0x4(%rsp),%rdi
  add    %r14,%rdi
  mov    %r12d,%edx
  mov    0x8(%rsp),%rsi
  call   <memcpy@plt>
  movslq %ebp,%rax
  movb   $0x0,(%r14,%rax,1)
  mov    %ebp,0x4(%rsp)
  test   %r15,%r15
  je     L107
  mov    %r15,%rdi
  call   <free@plt>
  mov    %ebp,0x4(%rsp)
L107:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L260
  cmp    $0x5c,%al
  je     L150
L13:
  cmp    0x2b(%rsp),%al
  jne    L254
  movzbl 0x1(%rbx),%edi
  cmp    $0x2b,%dil
  jne    L98
L334:
  add    $0x2,%rbx
  mov    0x2c(%rsp),%eax
L30:
  cltq
  shl    $0x4,%rax
  add    0x18(%rsp),%rax
  mov    (%rax),%rdx
  test   %rdx,%rdx
  js     L107
  mov    0x8(%rax),%r12d
  sub    %edx,%r12d
  mov    $0x0,%r15d
  add    0x20(%rsp),%rdx
  mov    %rdx,0x8(%rsp)
  jne    L184
  jmp    L107
L152:
  test   %r15,%r15
  je     L10
  mov    %r15,%rdi
  call   <free@plt>
L10:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x10(%rsp),%r14
L260:
  mov    %r14,%rax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L113:
  mov    %r15,%rdi
  call   <free@plt>
  jmp    L107
```

assistant: ```c
char *string_replace_regex_get_replace(const char *string, regmatch_t *regex_match, int last_match, const char *replace, const char reference_char) {
  int length, length_current, length_add, match;
  const char *ptr_replace, *ptr_add;
  char *result, *result2, *modified_replace, *temp, char_replace;
  length = (strlen(string) * 2);
  result = malloc(length + 1);
  if (!result)
    return NULL;
  result[0] = '\0';
  length_current = 0;
  ptr_replace = replace;
  while (ptr_replace && ptr_replace[0]) {
    ptr_add = NULL;
    length_add = 0;
    modified_replace = NULL;
    if ((ptr_replace[0] == '\\') && (ptr_replace[1] == reference_char)) {
      ptr_add = ptr_replace + 1;
      length_add = 1;
      ptr_replace += 2;
    } else if (ptr_replace[0] == reference_char) {
      if ((ptr_replace[1] == '+') || isdigit((unsigned char)ptr_replace[1])) {
        if (ptr_replace[1] == '+') {
          match = last_match;
          ptr_replace += 2;
        } else {
          if (isdigit((unsigned char)ptr_replace[2])) {
            match = ((ptr_replace[1] - '0') * 10) + (ptr_replace[2] - '0');
            ptr_replace += 3;
          } else {
            match = ptr_replace[1] - '0';
            ptr_replace += 2;
          }
        }
        if (regex_match[match].rm_so >= 0) {
          ptr_add = string + regex_match[match].rm_so;
          length_add = regex_match[match].rm_eo - regex_match[match].rm_so;
        }
      } else if ((ptr_replace[1] == '.') && (ptr_replace[2] >= 32) && (ptr_replace[2] <= 126) && ((ptr_replace[3] == '+') || isdigit((unsigned char)ptr_replace[3]))) {
        char_replace = ptr_replace[2];
        if (ptr_replace[3] == '+') {
          match = last_match;
          ptr_replace += 4;
        } else {
          if (isdigit((unsigned char)ptr_replace[4])) {
            match = ((ptr_replace[3] - '0') * 10) + (ptr_replace[4] - '0');
            ptr_replace += 5;
          } else {
            match = ptr_replace[3] - '0';
            ptr_replace += 4;
          }
        }
        if (regex_match[match].rm_so >= 0) {
          temp = string_strndup(string + regex_match[match].rm_so, regex_match[match].rm_eo - regex_match[match].rm_so);
          if (temp) {
            length_add = utf8_strlen(temp);
            modified_replace = malloc(length_add + 1);
            if (modified_replace) {
              memset(modified_replace, char_replace, length_add);
              modified_replace[length_add] = '\0';
              ptr_add = modified_replace;
            }
            free(temp);
          }
        }
      } else {
        ptr_replace++;
      }
    } else {
      ptr_add = ptr_replace;
      length_add = utf8_char_size(ptr_replace);
      ptr_replace += length_add;
    }
    if (ptr_add) {
      if (length_current + length_add > length) {
        length = (length * 2 >= length_current + length_add) ? length * 2 : length_current + length_add;
        result2 = realloc(result, length + 1);
        if (!result2) {
          if (modified_replace)
            free(modified_replace);
          free(result);
          return NULL;
        }
        result = result2;
      }
      memcpy(result + length_current, ptr_add, length_add);
      length_current += length_add;
      result[length_current] = '\0';
    }
    if (modified_replace)
      free(modified_replace);
  }
  return result;
}
```