user: Translate the below assembly code into C programming language:

```asm
<string_replace_regex_get_replace>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8d,%eax
  mov    %al,-0x68(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %eax,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L215
  mov    $0x0,%eax
  jmp    L368
L215:
  mov    -0x20(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x3c(%rbp)
  mov    -0x70(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L223
L17:
  movq   $0x0,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  movq   $0x0,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L9
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x68(%rbp)
  jne    L9
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x1,-0x38(%rbp)
  addq   $0x2,-0x30(%rbp)
  jmp    L307
L9:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,-0x68(%rbp)
  jne    L272
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  je     L303
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L241
L303:
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L256
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x2,-0x30(%rbp)
  jmp    L44
L256:
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L201
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x3,-0x30(%rbp)
  jmp    L44
L201:
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x2,-0x30(%rbp)
L44:
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  js     L307
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L307
L241:
  mov    -0x30(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L122
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x1f,%al
  jle    L122
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x7f,%al
  je     L122
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  je     L110
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L122
L110:
  mov    -0x30(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  mov    %al,-0x41(%rbp)
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L340
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x4,-0x30(%rbp)
  jmp    L190
L340:
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L96
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x5,-0x30(%rbp)
  jmp    L190
L96:
  mov    -0x30(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x34(%rbp)
  addq   $0x4,-0x30(%rbp)
L190:
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  js     L342
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x4,%rax
  mov    %rax,%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <string_strndup@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L342
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <utf8_strlen@plt>
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L107
  movsbl -0x41(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x28(%rbp)
L107:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L342
L122:
  addq   $0x1,-0x30(%rbp)
  jmp    L307
L272:
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <utf8_char_size@plt>
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  add    %rax,-0x30(%rbp)
  jmp    L307
L342:
  nop
L307:
  cmpq   $0x0,-0x28(%rbp)
  je     L211
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x40(%rbp)
  jge    L31
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%eax
  add    %ecx,%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L151
  cmpq   $0x0,-0x18(%rbp)
  je     L276
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L276:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L368
L151:
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L31:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x38(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x38(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L211:
  cmpq   $0x0,-0x18(%rbp)
  je     L223
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L223:
  cmpq   $0x0,-0x30(%rbp)
  je     L16
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L17
L16:
  mov    -0x20(%rbp),%rax
L368:
  leave
  ret
```

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;
}
```