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

```asm
<workload>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x148000(%rsp),%r11
L59:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L59
  sub    $0x860,%rsp
  mov    %rdi,-0x148848(%rbp)
  mov    %rsi,-0x148850(%rbp)
  mov    %rdx,-0x148858(%rbp)
  mov    %rcx,-0x148860(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x20,-0x14882c(%rbp)
  movl   $0x0,-0x148834(%rbp)
  cmpl   $0x0,-0x148834(%rbp)
  jne    L149
  movl   $0x80,-0x148834(%rbp)
L149:
  mov    -0x148858(%rbp),%rcx
  lea    -0x148010(%rbp),%rax
  mov    $0x8000,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x148830(%rbp)
  jmp    L58
L97:
  mov    -0x148830(%rbp),%eax
  cmp    -0x14882c(%rbp),%eax
  setl   %al
  movzbl %al,%eax
  mov    %eax,-0x148828(%rbp)
  cmpl   $0x0,-0x148830(%rbp)
  jle    L52
  mov    -0x14882c(%rbp),%eax
  cmp    -0x148830(%rbp),%eax
  jl     L52
  mov    $0x1,%eax
  jmp    L0
L52:
  mov    $0x0,%eax
L0:
  mov    %eax,-0x148824(%rbp)
  cmpl   $0x1,-0x148830(%rbp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,-0x148820(%rbp)
  mov    -0x14882c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x148830(%rbp)
  jne    L87
  mov    -0x148834(%rbp),%eax
  jmp    L111
L87:
  mov    $0x80,%eax
L111:
  mov    %eax,-0x14881c(%rbp)
  mov    -0x148830(%rbp),%eax
  cmp    -0x14882c(%rbp),%eax
  jne    L126
  mov    -0x148834(%rbp),%eax
  jmp    L81
L126:
  mov    $0x80,%eax
L81:
  mov    %eax,-0x148818(%rbp)
  mov    -0x14882c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x148830(%rbp)
  jne    L145
  mov    -0x148834(%rbp),%eax
  jmp    L18
L145:
  mov    $0x80,%eax
L18:
  mov    %eax,-0x148814(%rbp)
  mov    -0x148830(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L2
  mov    -0x148830(%rbp),%eax
  shl    $0x10,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x148850(%rbp),%rax
  lea    (%rdx,%rax,1),%r8
  mov    -0x148830(%rbp),%eax
  shl    $0x10,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x148848(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x14881c(%rbp),%ecx
  lea    -0x140010(%rbp),%rdx
  lea    -0x100010(%rbp),%rsi
  mov    -0x148828(%rbp),%eax
  mov    %ecx,%r9d
  mov    %rdx,%rcx
  mov    %rdi,%rdx
  mov    %eax,%edi
  call   <load@plt>
  mov    -0x148818(%rbp),%r8d
  lea    -0x148410(%rbp),%rdi
  lea    -0x148010(%rbp),%rcx
  lea    -0x120010(%rbp),%rdx
  lea    -0x80010(%rbp),%rsi
  mov    -0x148824(%rbp),%eax
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <compute@plt>
  mov    -0x148830(%rbp),%eax
  sub    $0x2,%eax
  shl    $0x7,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x148860(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x148814(%rbp),%ecx
  lea    -0x148810(%rbp),%rdx
  mov    -0x148820(%rbp),%eax
  mov    %eax,%edi
  call   <store@plt>
  jmp    L106
L2:
  mov    -0x148830(%rbp),%eax
  shl    $0x10,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x148850(%rbp),%rax
  lea    (%rdx,%rax,1),%r8
  mov    -0x148830(%rbp),%eax
  shl    $0x10,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x148848(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x14881c(%rbp),%ecx
  lea    -0x120010(%rbp),%rdx
  lea    -0x80010(%rbp),%rsi
  mov    -0x148828(%rbp),%eax
  mov    %ecx,%r9d
  mov    %rdx,%rcx
  mov    %rdi,%rdx
  mov    %eax,%edi
  call   <load@plt>
  mov    -0x148818(%rbp),%r8d
  lea    -0x148810(%rbp),%rdi
  lea    -0x148010(%rbp),%rcx
  lea    -0x140010(%rbp),%rdx
  lea    -0x100010(%rbp),%rsi
  mov    -0x148824(%rbp),%eax
  mov    %r8d,%r9d
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <compute@plt>
  mov    -0x148830(%rbp),%eax
  sub    $0x2,%eax
  shl    $0x7,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x148860(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x148814(%rbp),%ecx
  lea    -0x148410(%rbp),%rdx
  mov    -0x148820(%rbp),%eax
  mov    %eax,%edi
  call   <store@plt>
L106:
  addl   $0x1,-0x148830(%rbp)
L58:
  mov    -0x14882c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x148830(%rbp)
  jle    L97
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L70
  call   <__stack_chk_fail@plt>
L70:
  leave
  ret
```

assistant: ```c
void workload(double *nzval, short *cols, double *vec, double *out) {
#pragma HLS INTERFACE m_axi port = nzval offset = slave bundle = gmem1
#pragma HLS INTERFACE m_axi port = cols offset = slave bundle = gmem2
#pragma HLS INTERFACE m_axi port = vec offset = slave bundle = gmem1
#pragma HLS INTERFACE m_axi port = out offset = slave bundle = gmem1
#pragma HLS INTERFACE s_axilite port = nzval bundle = control
#pragma HLS INTERFACE s_axilite port = cols bundle = control
#pragma HLS INTERFACE s_axilite port = vec bundle = control
#pragma HLS INTERFACE s_axilite port = out bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  int num_tiles = ((1 << 12) + 128 - 1) / 128;
  int tail_rows = (1 << 12) % 128;
  if (tail_rows == 0)
    tail_rows = 128;
  double local_nzval_x[4][((128 + 4 - 1) / 4)][(1 << 9)];
#pragma HLS array_partition variable = local_nzval_x dim = 1 complete
  short local_cols_x[4][((128 + 4 - 1) / 4)][(1 << 9)];
#pragma HLS array_partition variable = local_cols_x dim = 1 complete
  double local_nzval_y[4][((128 + 4 - 1) / 4)][(1 << 9)];
#pragma HLS array_partition variable = local_nzval_y dim = 1 complete
  short local_cols_y[4][((128 + 4 - 1) / 4)][(1 << 9)];
#pragma HLS array_partition variable = local_cols_y dim = 1 complete
  double local_vec[(1 << 12)];
  memcpy(local_vec, vec, sizeof(double) * (1 << 12));
  double local_out_x[4][((128 + 4 - 1) / 4)];
#pragma HLS array_partition variable = local_out_x dim = 1 complete
  double local_out_y[4][((128 + 4 - 1) / 4)];
#pragma HLS array_partition variable = local_out_y dim = 1 complete
  int i, j, k;
  for (i = 0; i < num_tiles + 2; i++) {
    int load_flag = i < num_tiles;
    int compute_flag = i > 0 && i < num_tiles + 1;
    int store_flag = i > 1;
    int load_rows = i == num_tiles - 1 ? tail_rows : 128;
    int compute_rows = i == num_tiles ? tail_rows : 128;
    int store_rows = i == num_tiles + 1 ? tail_rows : 128;
    if (i % 2 == 0) {
      load(load_flag, local_nzval_x, nzval + i * 128 * (1 << 9), local_cols_x, cols + i * 128 * (1 << 9), load_rows);
      compute(compute_flag, local_nzval_y, local_cols_y, local_vec, local_out_y, compute_rows);
      store(store_flag, out + (i - 2) * 128, local_out_x, store_rows);
    } else {
      load(load_flag, local_nzval_y, nzval + i * 128 * (1 << 9), local_cols_y, cols + i * 128 * (1 << 9), load_rows);
      compute(compute_flag, local_nzval_x, local_cols_x, local_vec, local_out_x, compute_rows);
      store(store_flag, out + (i - 2) * 128, local_out_y, store_rows);
    }
  }
  return;
}
```