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

```asm
<main>:
  endbr64
  push   %r14
  xor    %edx,%edx
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    D4(%rip),%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x4(%rsp)
  lea    0x4(%rsp),%rbp
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L294:
  cmp    %eax,%edx
  je     L178
  nopl   0x0(%rax)
L264:
  cltq
  movzbl 0x10(%rsp,%rax,1),%ecx
  lea    -0x9(%rcx),%esi
  cmp    $0x1,%sil
  jbe    L173
  cmp    $0x20,%cl
  jne    L88
L173:
  mov    %rbp,%rdi
  call   <inc@plt>
  mov    0x4(%rsp),%eax
  mov    0x8(%rsp),%edx
  cmp    %edx,%eax
  jne    L264
L178:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    %eax,(%r12)
  je     L3
  nopw   0x0(%rax,%rax,1)
L216:
  cmp    $0xa,%eax
  jg     L61
  cmp    $0x8,%eax
  jg     L178
L278:
  movslq 0x4(%rsp),%rdx
  lea    0x8(%rsp),%rdi
  mov    %al,0x10(%rsp,%rdx,1)
  call   <inc@plt>
  mov    0x8(%rsp),%edx
  movslq 0x4(%rsp),%rax
L88:
  add    $0x3c,%edx
  lea    0x8(%rsp),%r13
  movslq %edx,%rcx
  mov    %edx,%esi
  imul   $0x4325c53f,%rcx,%rcx
  sar    $0x1f,%esi
  sar    $0x24,%rcx
  sub    %esi,%ecx
  imul   $0x3d,%ecx,%ecx
  sub    %ecx,%edx
  mov    %edx,0xc(%rsp)
L136:
  movzbl 0x10(%rsp,%rax,1),%eax
  cmp    $0x20,%al
  je     L16
  xor    %r14d,%r14d
  cmp    $0x9,%al
  jne    L1
  jmp    L16
  nopl   0x0(%rax)
L259:
  lea    -0x9(%rbx),%ecx
  movslq 0x8(%rsp),%rax
  cmp    $0x1,%ecx
  jbe    L109
  cmp    $0x20,%ebx
  jne    L298
L109:
  add    $0x3c,%eax
  movslq %eax,%rcx
  mov    %eax,%esi
  imul   $0x4325c53f,%rcx,%rcx
  sar    $0x1f,%esi
  sar    $0x24,%rcx
  sub    %esi,%ecx
  imul   $0x3d,%ecx,%ecx
  sub    %ecx,%eax
  mov    %eax,0xc(%rsp)
L249:
  mov    $0x1,%r14d
  cmp    $0xa,%ebx
  je     L334
  movslq 0x8(%rsp),%rax
L298:
  mov    %r13,%rdi
  mov    %bl,0x10(%rsp,%rax,1)
  call   <inc@plt>
  cmp    0x4(%rsp),%eax
  je     L192
L1:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    (%r12),%edx
  mov    %eax,%ebx
  cmp    %eax,%edx
  je     L3
  test   %r14d,%r14d
  jne    L259
  lea    -0x9(%rax),%eax
  cmp    $0x1,%eax
  jbe    L249
  cmp    $0x20,%ebx
  je     L249
  movslq 0x8(%rsp),%rax
  mov    %eax,0xc(%rsp)
  jmp    L298
  nopw   0x0(%rax,%rax,1)
L35:
  cmp    $0x20,%ebx
  je     L15
  movslq 0x8(%rsp),%rax
  mov    %eax,0xc(%rsp)
L273:
  mov    %r13,%rdi
  mov    %bl,0x10(%rsp,%rax,1)
  call   <inc@plt>
  cmp    %eax,0x4(%rsp)
  je     L309
L16:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    (%r12),%edx
  mov    %eax,%ebx
  cmp    %eax,%edx
  je     L3
  lea    -0x9(%rax),%eax
  cmp    $0x1,%eax
  ja     L35
L15:
  cmp    $0xa,%ebx
  je     L103
  movslq 0x8(%rsp),%rax
  jmp    L273
  nopl   0x0(%rax)
L61:
  cmp    $0x20,%eax
  jne    L278
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    %eax,(%r12)
  jne    L216
  nopw   0x0(%rax,%rax,1)
L3:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  add    $0x60,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L103:
  xor    %r14d,%r14d
L334:
  mov    $0xa,%ebx
L29:
  cmp    %edx,%ebx
  je     L3
  test   %r14d,%r14d
  jne    L276
  mov    0xc(%rsp),%eax
  add    $0x3b,%eax
  movslq %eax,%rbx
  cltd
  imul   $0x4325c53f,%rbx,%rbx
  sar    $0x24,%rbx
  sub    %edx,%ebx
  imul   $0x3d,%ebx,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  nopl   0x0(%rax,%rax,1)
L177:
  movslq 0x4(%rsp),%rax
  movsbl 0x10(%rsp,%rax,1),%edi
  call   <putchar@plt>
  mov    %rbp,%rdi
  call   <inc@plt>
  cmp    %ebx,%eax
  jne    L177
  mov    $0x2d,%edi
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  movslq 0x4(%rsp),%rax
  jmp    L136
  nopl   0x0(%rax)
L276:
  lea    0xc(%rsp),%rdi
  call   <inc@plt>
  nopw   0x0(%rax,%rax,1)
L166:
  movslq 0x4(%rsp),%rax
  movsbl 0x10(%rsp,%rax,1),%edi
  call   <putchar@plt>
  mov    %rbp,%rdi
  call   <inc@plt>
  cmp    0xc(%rsp),%eax
  jne    L166
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x8(%rsp),%edx
  mov    0x4(%rsp),%eax
  jmp    L294
  nopl   0x0(%rax)
L309:
  xor    %r14d,%r14d
L192:
  mov    (%r12),%edx
  jmp    L29
L41:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main() {
  char buffer[60 + 1];
  int c;
  int print_i = 0;
  int scan_i = 0;
  int char_i = 0;
  int state = 0;
  while (state != 5) {
    switch (state) {
    case 0:
      while (print_i != scan_i && (buffer[print_i] == ' ' || buffer[print_i] == '\t' || buffer[print_i] == '\n'))
        inc(&print_i);
      if (print_i == scan_i) {
        while ((c = getchar()) != EOF && (c == ' ' || c == '\t' || c == '\n'))
          ;
        if (c == EOF) {
          state = 5;
          break;
        }
        buffer[print_i] = c;
        inc(&scan_i);
      }
      char_i = (scan_i - 1 + 60 + 1) % (60 + 1);
      state = 1;
      break;
    case 1: {
      int first_word_found = 0;
      char prev_c = buffer[print_i];
      do {
        c = getchar();
        if (c == EOF)
          break;
        if (!first_word_found) {
          if (c != ' ' && c != '\t' && c != '\n')
            char_i = scan_i;
          else if (prev_c != ' ' && prev_c != '\t')
            first_word_found = 1;
        } else if (prev_c != ' ' && prev_c != '\t' && (c == ' ' || c == '\t' || c == '\n'))
          char_i = (scan_i - 1 + 60 + 1) % (60 + 1);
        if (c == '\n')
          break;
        buffer[scan_i] = c;
      } while (inc(&scan_i) != print_i);
      if (c == EOF)
        state = 5;
      else if (!first_word_found)
        state = 2;
      else
        state = 3;
      break;
    }
    case 2: {
      int end_i = (char_i - 2 + 60 + 1) % (60 + 1);
      do
        putchar(buffer[print_i]);
      while (inc(&print_i) != end_i);
      putchar('-');
      putchar('\n');
      state = 1;
      break;
    }
    case 3:
      inc(&char_i);
      do
        putchar(buffer[print_i]);
      while (inc(&print_i) != char_i);
      putchar('\n');
      state = 0;
      break;
    case 4:
      inc(&char_i);
      do
        putchar(buffer[print_i]);
      while (inc(&print_i) != scan_i);
      putchar('\n');
      state = 5;
      break;
    default:
      printf("Error! non-existent state.\n");
      return 1;
    }
  }
  return 0;
}
```