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

```asm
<reduceSpace>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  movb   $0x20,-0x1a(%rbp)
  movb   $0x20,-0x1b(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L90
L116:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  movzbl -0x1b(%rbp),%eax
  cmp    -0x1a(%rbp),%al
  jne    L45
  movzbl -0x1b(%rbp),%eax
  cmp    -0x19(%rbp),%al
  je     L45
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x14(%rbp)
L45:
  movzbl -0x19(%rbp),%eax
  cmp    -0x1a(%rbp),%al
  je     L114
  addl   $0x1,-0x10(%rbp)
L114:
  movzbl -0x1b(%rbp),%eax
  cmp    -0x1a(%rbp),%al
  je     L61
  movzbl -0x19(%rbp),%eax
  cmp    -0x1a(%rbp),%al
  je     L112
L61:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jne    L2
  movzbl -0x19(%rbp),%eax
  cmp    -0x1a(%rbp),%al
  je     L2
L112:
  movl   $0x0,-0x8(%rbp)
  jmp    L153
L138:
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x8(%rbp)
L153:
  mov    -0x8(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L138
  mov    -0x18(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L119
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x1a(%rbp),%eax
  mov    %al,(%rdx)
L119:
  movl   $0x0,-0x10(%rbp)
L2:
  movzbl -0x19(%rbp),%eax
  mov    %al,-0x1b(%rbp)
  addl   $0x1,-0xc(%rbp)
L90:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L116
  cmpl   $0x1,-0x18(%rbp)
  jle    L23
  mov    -0x18(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,-0x1a(%rbp)
  jne    L23
  mov    -0x18(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L23:
  cmpl   $0x0,-0x18(%rbp)
  jne    L54
  mov    -0x18(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L54
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L54:
  nop
  leave
  ret
```

assistant: ```c
void reduceSpace(char *s) {
  int startPos = 0;
  int wordbegin = 0;
  int wordLength = 0;
  int length = strlen(s);
  char switchChar = ' ';
  char beforeChar = ' ';
  for (int i = 0; i < length; i++) {
    char currentChar = s[i];
    if (beforeChar == switchChar && beforeChar != currentChar) {
      wordbegin = i;
    }
    if (currentChar != switchChar) {
      wordLength++;
    }
    if ((beforeChar != switchChar && currentChar == switchChar) || (i == length - 1 && currentChar != switchChar)) {
      for (int i = 0; i < wordLength; i++) {
        s[startPos++] = s[wordbegin + i];
      }
      if (startPos < length) {
        s[startPos++] = switchChar;
      }
      wordLength = 0;
    }
    beforeChar = currentChar;
  }
  if (startPos > 1 && s[startPos - 1] == switchChar) {
    s[startPos - 1] = '\0';
  }
  if (startPos == 0 && startPos < length) {
    s[startPos] = '\0';
  }
}
```