user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x160,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x148(%rbp)
  mov    -0x148(%rbp),%eax
  mov    %eax,-0x14c(%rbp)
  mov    -0x14c(%rbp),%eax
  mov    %eax,-0x150(%rbp)
  movl   $0x0,-0x158(%rbp)
  jmp    L150
L109:
  mov    -0x158(%rbp),%eax
  cltq
  movl   $0x0,-0x140(%rbp,%rax,4)
  addl   $0x1,-0x158(%rbp)
L150:
  cmpl   $0x4b,-0x158(%rbp)
  jle    L109
  movl   $0x0,-0x15c(%rbp)
  mov    -0x15c(%rbp),%eax
  mov    %eax,-0x160(%rbp)
  jmp    L65
L26:
  cmpl   $0x20,-0x144(%rbp)
  je     L165
  cmpl   $0x9,-0x144(%rbp)
  je     L165
  cmpl   $0xa,-0x144(%rbp)
  jne    L95
L165:
  mov    -0x15c(%rbp),%eax
  mov    %eax,-0x160(%rbp)
  movl   $0x0,-0x15c(%rbp)
  jmp    L137
L95:
  mov    -0x15c(%rbp),%eax
  mov    %eax,-0x160(%rbp)
  movl   $0x1,-0x15c(%rbp)
  addl   $0x1,-0x150(%rbp)
L137:
  cmpl   $0x1,-0x160(%rbp)
  jne    L65
  cmpl   $0x0,-0x15c(%rbp)
  jne    L65
  mov    -0x15c(%rbp),%eax
  mov    %eax,-0x160(%rbp)
  movl   $0x0,-0x15c(%rbp)
  mov    -0x150(%rbp),%eax
  cltq
  mov    -0x140(%rbp,%rax,4),%eax
  lea    0x1(%rax),%edx
  mov    -0x150(%rbp),%eax
  cltq
  mov    %edx,-0x140(%rbp,%rax,4)
  mov    -0x150(%rbp),%eax
  cltq
  mov    -0x140(%rbp,%rax,4),%eax
  cmp    %eax,-0x148(%rbp)
  jge    L51
  mov    -0x150(%rbp),%eax
  cltq
  mov    -0x140(%rbp,%rax,4),%eax
  mov    %eax,-0x148(%rbp)
L51:
  mov    -0x150(%rbp),%eax
  cmp    -0x14c(%rbp),%eax
  jle    L175
  mov    -0x150(%rbp),%eax
  mov    %eax,-0x14c(%rbp)
L175:
  movl   $0x0,-0x150(%rbp)
L65:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %eax,-0x144(%rbp)
  mov    D9(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x144(%rbp)
  jne    L26
  cmpl   $0x4b,-0x14c(%rbp)
  jle    L85
  movl   $0x4b,-0x14c(%rbp)
L85:
  movl   $0x1,-0x154(%rbp)
  jmp    L46
L181:
  movl   $0x1,-0x158(%rbp)
  jmp    L176
L170:
  mov    -0x158(%rbp),%eax
  cltq
  mov    -0x140(%rbp,%rax,4),%eax
  cmp    %eax,-0x154(%rbp)
  jg     L125
  mov    $0x7c,%edi
  call   <putchar@plt>
  jmp    L163
L125:
  mov    $0x20,%edi
  call   <putchar@plt>
L163:
  addl   $0x1,-0x158(%rbp)
L176:
  mov    -0x158(%rbp),%eax
  cmp    -0x14c(%rbp),%eax
  jle    L170
  mov    $0xa,%edi
  call   <putchar@plt>
  addl   $0x1,-0x154(%rbp)
L46:
  mov    -0x154(%rbp),%eax
  cmp    -0x148(%rbp),%eax
  jle    L181
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L87
  call   <__stack_chk_fail@plt>
L87:
  leave
  ret
```

assistant: ```c
int main(void) {
  int ch, prevstate, state;
  int i, j, wordlen, maxwordlen, maxwordfreq;
  int wordfreq[75 + 1];
  wordlen = maxwordlen = maxwordfreq = 0;
  for (i = 0; i < (75 + 1); ++i)
    wordfreq[i] = 0;
  prevstate = state = 0;
  while ((ch = getchar()) != EOF) {
    if (ch == ' ' || ch == '\t' || ch == '\n') {
      prevstate = state;
      state = 0;
    } else {
      prevstate = state;
      state = 1;
      ++wordlen;
    }
    if (prevstate == 1 && state == 0) {
      prevstate = state;
      state = 0;
      ++wordfreq[wordlen];
      if (wordfreq[wordlen] > maxwordfreq)
        maxwordfreq = wordfreq[wordlen];
      if (wordlen > maxwordlen)
        maxwordlen = wordlen;
      wordlen = 0;
    }
  }
  if (maxwordlen > 75)
    maxwordlen = 75;
  for (j = 1; j <= maxwordfreq; ++j) {
    for (i = 1; i <= maxwordlen; ++i) {
      if (wordfreq[i] >= j)
        putchar('|');
      else
        putchar(' ');
    }
    putchar('\n');
  }
  return 0;
}
```