user: Demonstrate the C code that generates the assembly output below:

```asm
<dedisperse_blocked_cached>:
  endbr64
  push   %r15
  lea    0x3ff(%rcx),%eax
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x78,%rsp
  test   %ecx,%ecx
  cmovns %ecx,%eax
  mov    %rdi,0x68(%rsp)
  mov    $0x80,%edi
  mov    %rsi,0x38(%rsp)
  sar    $0xa,%eax
  mov    %ecx,0x10(%rsp)
  mov    %eax,0x20(%rsp)
  xor    %eax,%eax
  call   <get_npass@plt>
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <get_npass@plt>
  test   %ebx,%ebx
  lea    0x7f(%rbx),%eax
  mov    $0x480,%esi
  cmovns %ebx,%eax
  mov    $0x80,%edi
  mov    %ebx,0x48(%rsp)
  sar    $0x7,%eax
  mov    %eax,%edx
  mov    %eax,0x28(%rsp)
  mov    %ebx,%eax
  mov    %edx,%ecx
  cltd
  idiv   %ecx
  mov    %eax,0x64(%rsp)
  xor    %eax,%eax
  call   <matrix@plt>
  mov    $0x480,%esi
  mov    $0x80,%edi
  movslq %eax,%r14
  xor    %eax,%eax
  mov    %r14,0x8(%rsp)
  call   <matrix@plt>
  movslq %eax,%rdx
  movslq %ebx,%rax
  shl    $0x3,%rax
  mov    %rdx,0x18(%rsp)
  mov    %rax,0x30(%rsp)
  cmp    $0x7f,%ebx
  jle    L96
  movl   $0x0,0x2c(%rsp)
  mov    %r14,%rax
  sub    %r14,%r15
  mov    %rbp,%r14
  mov    %r15,%r13
  sub    %rax,%r14
  lea    0x400(%rax),%rbx
L153:
  cmpl   $0x3ff,0x10(%rsp)
  movl   $0x480,0x14(%rsp)
  movq   $0x0,(%rsp)
  jle    L35
L165:
  mov    (%rsp),%esi
  mov    0x14(%rsp),%edx
  shl    $0xa,%esi
  mov    %edx,%eax
  cmp    %edx,0x10(%rsp)
  jl     L33
L232:
  mov    (%rsp),%rbp
  sub    %esi,%eax
  mov    0x8(%rsp),%r15
  movslq %eax,%r12
  shl    $0x2,%r12
  shl    $0xc,%rbp
  xchg   %ax,%ax
L70:
  mov    (%r14,%r15,1),%rsi
  mov    (%r15),%rdi
  mov    %r12,%rdx
  add    $0x8,%r15
  add    %rbp,%rsi
  call   <memcpy@plt>
  cmp    %rbx,%r15
  jne    L70
  mov    0x8(%rsp),%r15
  mov    0x18(%rsp),%rsi
  mov    $0x480,%ecx
  xor    %eax,%eax
  mov    $0x80,%edx
  mov    %r15,%rdi
  call   <dedisperse@plt>
  mov    %r15,%rax
  nopl   0x0(%rax)
L40:
  mov    (%rax),%rsi
  mov    0x0(%r13,%rax,1),%rcx
  add    $0x8,%rax
  mov    (%rsi),%rdx
  add    %rbp,%rcx
  lea    0x8(%rcx),%rdi
  mov    %rdx,(%rcx)
  mov    0xff8(%rsi),%rdx
  and    $0xfffffffffffffff8,%rdi
  mov    %rdx,0xff8(%rcx)
  sub    %rdi,%rcx
  sub    %rcx,%rsi
  add    $0x1000,%ecx
  shr    $0x3,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
  cmp    %rbx,%rax
  jne    L40
  addq   $0x1,(%rsp)
  mov    (%rsp),%rax
  addl   $0x400,0x14(%rsp)
  cmp    %eax,0x20(%rsp)
  jg     L165
L35:
  addl   $0x1,0x2c(%rsp)
  add    $0x400,%r13
  mov    0x2c(%rsp),%eax
  add    $0x400,%r14
  cmp    %eax,0x28(%rsp)
  jg     L153
  mov    0x8(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <malloc@plt>
  mov    0x38(%rsp),%rdi
  movslq 0x28(%rsp),%r8
  xor    %r11d,%r11d
  mov    %rax,0x58(%rsp)
  mov    %rax,%r10
  add    $0x400,%rdi
  shl    $0x3,%r8
L118:
  lea    -0x400(%rdi),%rax
  lea    0x0(,%r11,4),%r9
  mov    %r10,%rcx
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L230:
  mov    (%rax),%rsi
  add    $0x8,%rax
  add    %rdx,%rsi
  add    %r9,%rdx
  mov    %rsi,(%rcx)
  add    %r8,%rcx
  cmp    %rax,%rdi
  jne    L230
  add    $0x1,%r11
  add    $0x8,%r10
  add    $0x400,%rdi
  cmp    %r11d,0x28(%rsp)
  jg     L118
L22:
  mov    0x28(%rsp),%ebx
  mov    $0x20000,%eax
  cltd
  idiv   %ebx
  mov    %eax,0x28(%rsp)
  mov    0x10(%rsp),%eax
  mov    0x28(%rsp),%r15d
  cltd
  idiv   %r15d
  mov    %ebx,%edx
  add    %r15d,%ebx
  mov    %edx,%edi
  mov    %ebx,%esi
  mov    %ebx,0x8(%rsp)
  mov    %ebx,%r14d
  mov    %edx,%ebx
  mov    %eax,0x2c(%rsp)
  xor    %eax,%eax
  call   <matrix@plt>
  mov    %r14d,%esi
  mov    %ebx,%edi
  cltq
  mov    %rax,(%rsp)
  xor    %eax,%eax
  call   <matrix@plt>
  mov    0x64(%rsp),%edx
  cltq
  mov    %rax,0x30(%rsp)
  test   %edx,%edx
  jle    L166
  movslq %ebx,%rax
  movl   $0x0,0x60(%rsp)
  shl    $0x2,%rax
  movl   $0x0,0x4c(%rsp)
  mov    %rax,0x50(%rsp)
  movslq %r15d,%rax
  lea    0x0(,%rax,4),%r14
L136:
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jle    L23
  movslq 0x60(%rsp),%rax
  movl   $0x0,0x14(%rsp)
  xor    %ebp,%ebp
  shl    $0x3,%rax
  mov    %rax,%r15
  sub    0x30(%rsp),%rax
  add    0x68(%rsp),%rax
  mov    %rax,0x40(%rsp)
  mov    0x8(%rsp),%eax
  sub    (%rsp),%r15
  add    0x58(%rsp),%r15
  mov    %r15,0x38(%rsp)
  mov    %eax,0x18(%rsp)
L176:
  mov    0x18(%rsp),%eax
  addl   $0x1,0x14(%rsp)
  mov    %eax,%r12d
  sub    0x8(%rsp),%r12d
  cmp    %eax,0x10(%rsp)
  jl     L73
  cmpl   $0x7f,0x48(%rsp)
  jle    L179
L31:
  xor    %r13d,%r13d
  sub    %r12d,%eax
  mov    %r14,0x20(%rsp)
  mov    (%rsp),%r15
  movslq %eax,%r12
  mov    %r13d,%r14d
  mov    0x38(%rsp),%r13
  shl    $0x2,%r12
  nop
L185:
  mov    0x0(%r13,%r15,1),%rsi
  mov    (%r15),%rdi
  mov    %r12,%rdx
  add    $0x1,%r14d
  add    $0x8,%r15
  add    %rbp,%rsi
  call   <memcpy@plt>
  cmp    %r14d,%ebx
  jg     L185
  mov    0x30(%rsp),%r12
  mov    0x8(%rsp),%ecx
  mov    %ebx,%edx
  xor    %eax,%eax
  mov    (%rsp),%rdi
  mov    0x20(%rsp),%r14
  xor    %r13d,%r13d
  mov    %r12,%rsi
  call   <dedisperse@plt>
  mov    0x40(%rsp),%r15
  cs nopw 0x0(%rax,%rax,1)
L221:
  mov    (%r15,%r12,1),%rdi
  mov    (%r12),%rsi
  mov    %r14,%rdx
  add    $0x1,%r13d
  add    $0x8,%r12
  add    %rbp,%rdi
  call   <memcpy@plt>
  cmp    %r13d,%ebx
  jg     L221
L130:
  mov    0x28(%rsp),%edx
  add    %r14,%rbp
  add    %edx,0x18(%rsp)
  mov    0x2c(%rsp),%edx
  cmp    %edx,0x14(%rsp)
  jne    L176
L23:
  addl   $0x1,0x4c(%rsp)
  mov    0x4c(%rsp),%eax
  add    %ebx,0x60(%rsp)
  cmp    %eax,0x64(%rsp)
  jne    L136
L166:
  mov    (%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  add    $0x78,%rsp
  mov    %rbx,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <free@plt>
L73:
  cmpl   $0x7f,0x48(%rsp)
  jle    L179
  mov    (%rsp),%r15
  mov    %rbp,0x20(%rsp)
  xor    %r13d,%r13d
  mov    %r15,%rbp
  mov    0x50(%rsp),%r15
  cs nopw 0x0(%rax,%rax,1)
L26:
  mov    0x0(%rbp),%rdi
  mov    %r15,%rdx
  xor    %esi,%esi
  add    $0x1,%r13d
  add    $0x8,%rbp
  add    %r14,%rdi
  call   <memset@plt>
  cmp    %r13d,%ebx
  jg     L26
  mov    0x20(%rsp),%rbp
  mov    0x10(%rsp),%eax
  jmp    L31
L33:
  mov    0x8(%rsp),%rdx
  nopl   0x0(%rax)
L122:
  mov    (%rdx),%rax
  add    $0x8,%rdx
  lea    0x1008(%rax),%rdi
  movq   $0x0,0x1000(%rax)
  movq   $0x0,0x11f8(%rax)
  and    $0xfffffffffffffff8,%rdi
  sub    %edi,%eax
  lea    0x1200(%rax),%ecx
  xor    %eax,%eax
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    %rbx,%rdx
  jne    L122
  mov    0x10(%rsp),%eax
  jmp    L232
L179:
  mov    0x8(%rsp),%ecx
  mov    0x30(%rsp),%rsi
  mov    %ebx,%edx
  xor    %eax,%eax
  mov    (%rsp),%rdi
  call   <dedisperse@plt>
  jmp    L130
L96:
  mov    0x8(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,0x58(%rsp)
  jmp    L22
```

assistant: ```c
void dedisperse_blocked_cached(float **dat, float **dat2, int nchan, int ndat) {
  int nchan1 = 128;
  int chunk_size = 1024;
  int nchunk = ndat / chunk_size;
  int npass1 = get_npass(nchan1);
  int npass = get_npass(nchan);
  int npass2 = npass - npass1;
  int nchan2 = nchan / nchan1;
  int nblock = nchan / nchan1;
  int nblock2 = nchan / nchan2;
#pragma omp parallel
  {
    float **tmp1 = matrix(nchan1, chunk_size + nchan1);
    float **tmp2 = matrix(nchan1, chunk_size + nchan1);
#pragma omp for collapse(2) schedule(dynamic, 2)
    for (int i = 0; i < nblock; i++) {
      for (int j = 0; j < nchunk; j++) {
        int istart = j * chunk_size;
        int istop = (j + 1) * chunk_size + nchan1;
        if (istop > ndat) {
          istop = ndat;
          for (int k = 0; k < nchan1; k++)
            memset(tmp1[k] + chunk_size, 0, sizeof(float) * nchan1);
        }
        for (int k = 0; k < nchan1; k++)
          memcpy(tmp1[k], &(dat[i * nchan1 + k][istart]), (istop - istart) * sizeof(float));
        dedisperse(tmp1, tmp2, nchan1, chunk_size + nchan1);
        for (int k = 0; k < nchan1; k++)
          memcpy(&(dat2[i * nchan1 + k][istart]), tmp1[k], chunk_size * sizeof(float));
      }
    }
    free(tmp1[0]);
    free(tmp1);
    free(tmp2[0]);
    free(tmp2);
  }
  float **dat_shift = (float **)malloc(sizeof(float *) * nchan);
  for (int i = 0; i < nblock; i++)
    for (int j = 0; j < nchan1; j++)
      dat_shift[j * nblock + i] = dat2[i * nchan1 + j] + i * j;
  int nelem = nchan1 * chunk_size;
  chunk_size = nelem / nchan2;
  nchunk = ndat / chunk_size;
#pragma omp parallel
  {
    float **tmp1 = matrix(nchan2, chunk_size + nchan2);
    float **tmp2 = matrix(nchan2, chunk_size + nchan2);
#pragma omp for collapse(2) schedule(dynamic, 4)
    for (int i = 0; i < nblock2; i++) {
      for (int j = 0; j < nchunk; j++) {
        int istart = j * chunk_size;
        int istop = (j + 1) * chunk_size + nchan2;
        if (istop > ndat) {
          istop = ndat;
          for (int k = 0; k < nchan2; k++)
            memset(tmp1[k] + chunk_size, 0, sizeof(float) * nchan2);
        }
        for (int k = 0; k < nchan2; k++) {
          memcpy(tmp1[k], dat_shift[i * nchan2 + k] + istart, (istop - istart) * sizeof(float));
        }
        dedisperse(tmp1, tmp2, nchan2, chunk_size + nchan2);
        for (int k = 0; k < nchan2; k++)
          memcpy(dat[i * nchan2 + k] + istart, tmp2[k], chunk_size * sizeof(float));
      }
    }
    free(tmp1[0]);
    free(tmp1);
    free(tmp2[0]);
    free(tmp2);
  }
}
```