user: 这段汇编代码用C语言表示是什么样的?

```asm
<frequency_distribution>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %ecx,-0x40(%rbp)
  mov    %r8d,-0x44(%rbp)
  mov    %r9,-0x50(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  cltd
  idivl  -0x3c(%rbp)
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%eax
  cltd
  idivl  -0x3c(%rbp)
  mov    %edx,-0x8(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  js     L2
  mov    -0x40(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jge    L2
  mov    $0x1,%eax
  jmp    L306
L2:
  mov    $0x0,%eax
L306:
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x34(%rbp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x44(%rbp)
  js     L15
  mov    -0x44(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jg     L15
  mov    $0x1,%eax
  jmp    L311
L15:
  mov    $0x0,%eax
L311:
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,0x10(%rbp)
  jne    L53
  movl   $0x0,-0x1c(%rbp)
  jmp    L284
L324:
  mov    -0x1c(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  setl   %al
  movzbl %al,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x40(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jne    L181
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L240
L239:
  mov    -0x34(%rbp),%edx
  mov    -0x20(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x10(%rbp)
L240:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L239
L181:
  mov    -0x4(%rbp),%eax
  add    %eax,-0x20(%rbp)
  addl   $0x1,-0x1c(%rbp)
L284:
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L324
  jmp    L5
L53:
  cmpl   $0x1,0x10(%rbp)
  jne    L304
  movl   $0x0,-0x1c(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L93
L261:
  mov    -0x1c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jne    L207
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
L207:
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  cltd
  idivl  -0x3c(%rbp)
  mov    %edx,-0x1c(%rbp)
  addl   $0x1,-0x14(%rbp)
L93:
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L261
  jmp    L5
L304:
  cmpl   $0x2,0x10(%rbp)
  jne    L5
  movl   $0x0,-0x1c(%rbp)
  movl   $0x1,-0x18(%rbp)
  mov    -0x38(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L111
L187:
  mov    -0x1c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jne    L173
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x24(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
L173:
  mov    -0x18(%rbp),%eax
  add    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L0
  cmpl   $0xffffffff,-0x1c(%rbp)
  jne    L56
L0:
  negl   -0x18(%rbp)
  mov    -0x18(%rbp),%eax
  add    %eax,-0x1c(%rbp)
L56:
  cmpl   $0x0,-0x1c(%rbp)
  js     L21
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jge    L21
  mov    $0x1,%eax
  jmp    L250
L21:
  mov    $0x0,%eax
L250:
  mov    %eax,%edi
  call   <assert@plt>
  subl   $0x1,-0x14(%rbp)
L111:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jge    L187
L5:
  mov    -0xc(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jg     L323
  mov    -0x24(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jg     L323
  mov    $0x1,%eax
  jmp    L75
L323:
  mov    $0x0,%eax
L75:
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x8(%rbp)
  jg     L216
  mov    -0xc(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jne    L65
L216:
  mov    $0x1,%eax
  jmp    L129
L65:
  mov    $0x0,%eax
L129:
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x24(%rbp),%eax
  leave
  ret
```

assistant: ```c
int frequency_distribution(int nw_low, int nw, int npes, int pe, int maxlw, int *freq_index, int type) {
  int my_n_local_w = 0;
  int min_n_local_w, n_local_w;
  int leftover_w;
  int index = 0, ipe, dpe, iw, i;
  min_n_local_w = nw / npes;
  leftover_w = nw % npes;
  assert(0 <= pe && pe < npes);
  assert(0 < nw_low);
  assert(0 <= maxlw && maxlw <= nw);
  if (type == 0) {
    for (ipe = 0; ipe < npes; ipe++) {
      n_local_w = min_n_local_w + (ipe < leftover_w ? 1 : 0);
      if (pe == ipe) {
        my_n_local_w = n_local_w;
        for (i = 0; i < my_n_local_w; i++) {
          freq_index[i] = nw_low + index + i;
        }
      }
      index += n_local_w;
    }
  } else if (type == 1) {
    ipe = 0;
    for (iw = nw_low; iw < nw + nw_low; iw++) {
      if (ipe == pe)
        freq_index[my_n_local_w++] = iw;
      ipe = (ipe + 1) % npes;
    }
  } else if (type == 2) {
    ipe = 0;
    dpe = 1;
    for (iw = nw - 1 + nw_low; iw >= nw_low; iw--) {
      if (ipe == pe)
        freq_index[my_n_local_w++] = iw;
      ipe += dpe;
      if (ipe == npes || ipe == -1) {
        dpe *= -1;
        ipe += dpe;
      }
      assert(0 <= ipe && ipe < npes);
    }
  }
  assert(min_n_local_w <= my_n_local_w && my_n_local_w <= maxlw);
  assert(leftover_w > 0 || min_n_local_w == my_n_local_w);
  return my_n_local_w;
}
```