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

```asm
<code_from_pwm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %edx,-0xb8(%rbp)
  mov    %rcx,-0xc8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xa4(%rbp)
  movl   $0x0,-0xa0(%rbp)
  movl   $0x0,-0x9c(%rbp)
  movl   $0x140,-0x94(%rbp)
  movl   $0x0,-0x90(%rbp)
  movl   $0x0,-0x8c(%rbp)
  movl   $0x0,-0x98(%rbp)
  jmp    L91
L42:
  mov    -0xa4(%rbp),%edx
  mov    -0x94(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8c(%rbp)
  movl   $0x0,-0x98(%rbp)
  movl   $0x0,-0xa0(%rbp)
  jmp    L108
L19:
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8c(%rbp)
  jle    L89
  mov    -0xa0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xa4(%rbp)
  jge    L89
  addl   $0x1,-0x98(%rbp)
L89:
  addl   $0x1,-0xa0(%rbp)
L108:
  mov    -0xa0(%rbp),%eax
  cmp    -0xb8(%rbp),%eax
  jl     L19
  mov    -0x94(%rbp),%eax
  add    %eax,-0xa4(%rbp)
  mov    -0x9c(%rbp),%eax
  cltq
  mov    -0x98(%rbp),%edx
  mov    %edx,-0x80(%rbp,%rax,4)
  addl   $0x1,-0x9c(%rbp)
L91:
  mov    -0xa4(%rbp),%eax
  cmp    -0xb4(%rbp),%eax
  jl     L42
  mov    -0x9c(%rbp),%eax
  mov    %eax,-0x90(%rbp)
  mov    -0x90(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x88(%rbp)
  movl   $0x0,-0x9c(%rbp)
  movl   $0x0,-0xa4(%rbp)
  jmp    L74
L109:
  mov    -0xa4(%rbp),%eax
  cltq
  mov    -0x80(%rbp,%rax,4),%eax
  cmp    $0x5,%eax
  jle    L4
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movl   $0x3,(%rax)
  addl   $0x1,-0x9c(%rbp)
  jmp    L111
L4:
  mov    -0xa4(%rbp),%eax
  cltq
  mov    -0x80(%rbp,%rax,4),%eax
  test   %eax,%eax
  jle    L111
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movl   $0x2,(%rax)
  addl   $0x1,-0x9c(%rbp)
L111:
  addl   $0x1,-0xa4(%rbp)
L74:
  mov    -0xa4(%rbp),%eax
  cmp    -0x90(%rbp),%eax
  jl     L109
  mov    -0xc8(%rbp),%rax
  mov    -0x88(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L54
  call   <__stack_chk_fail@plt>
L54:
  leave
  ret
```

assistant: ```c
void code_from_pwm(int sig_length, int *positivepklocs, int positivepkcnt, int **codestorage) {
  int i = 0, j = 0, k = 0;
  int window = 2.5 * 128, numof_windows = 0, limit = 0, number = 0;
  int period[30];
  int *codetemp;
  while (i < sig_length) {
    limit = i + window;
    number = 0;
    for (j = 0; j < positivepkcnt; j++) {
      if (positivepklocs[j] < limit && positivepklocs[j] > i)
        number = number + 1;
    }
    i = i + window;
    period[k] = number;
    k = k + 1;
  }
  numof_windows = k;
  codetemp = (int *)malloc(numof_windows * sizeof(int));
  k = 0;
  for (i = 0; i < numof_windows; i++) {
    if (period[i] > 5) {
      codetemp[k] = 3;
      k = k + 1;
    } else if (period[i] > 0) {
      codetemp[k] = 2;
      k = k + 1;
    }
  }
  *codestorage = codetemp;
}
```