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

```asm
<util_strreplace>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  movb   $0x0,-0x11(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L24
L148:
  addl   $0x1,-0x8(%rbp)
L24:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L148
  movl   $0x0,-0x10(%rbp)
  jmp    L112
L3:
  movl   $0x0,-0xc(%rbp)
L111:
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  je     L128
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L128
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L32
L128:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L50
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
L50:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L138
  subl   $0x1,-0x3c(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L114
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <replace@plt>
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,-0x10(%rbp)
  jmp    L5
L114:
  cmpl   $0x0,-0x3c(%rbp)
  jne    L5
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <replace@plt>
  movzbl -0x11(%rbp),%eax
  jmp    L145
L138:
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L167
  movzbl -0x11(%rbp),%eax
  jmp    L145
L167:
  addl   $0x1,-0xc(%rbp)
  jmp    L111
L32:
  nop
  jmp    L81
L5:
  nop
L81:
  addl   $0x1,-0x10(%rbp)
L112:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L3
  movzbl -0x11(%rbp),%eax
L145:
  leave
  ret
```

assistant: ```c
char util_strreplace(char a[], char x[], char y[], int n) {
  int replaceAll = !n;
  int i, j, lengthY;
  char dot = '\0';
  for (lengthY = 0; y[lengthY] != '\0'; lengthY++)
    ;
  for (i = 0; a[i] != '\0'; i++) {
    for (j = 0;; j++) {
      if (a[i + j] != x[j] && x[j] != '\0' && x[j] != '.')
        break;
      if (x[j] == '.')
        dot = a[i + j];
      if (x[j] == '\0') {
        n--;
        if (replaceAll) {
          replace(a, y, i, j);
          i += lengthY - 1;
        } else if (n == 0) {
          replace(a, y, i, j);
          return dot;
        }
        break;
      }
      if (a[i + j] == '\0')
        return dot;
    }
  }
  return dot;
}
```