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

```asm
<max_subarray_optimal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %esi,-0x6c(%rbp)
  mov    %edx,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L26
L112:
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L42:
  cmp    %rdx,%rsp
  je     L51
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L42
L51:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L35
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L35:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L54
L110:
  mov    -0x40(%rbp),%rax
  mov    -0x58(%rbp),%edx
  movslq %edx,%rdx
  movl   $0x0,(%rax,%rdx,4)
  addl   $0x1,-0x58(%rbp)
L54:
  mov    -0x58(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L110
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L68
L12:
  movl   $0x0,-0x50(%rbp)
  jmp    L125
L24:
  mov    -0x40(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%edx
  mov    -0x54(%rbp),%eax
  imul   -0x6c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x50(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x40(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  addl   $0x1,-0x50(%rbp)
L125:
  mov    -0x50(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L24
  mov    -0x6c(%rbp),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <max_subarray@plt>
  mov    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jle    L25
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
L25:
  addl   $0x1,-0x54(%rbp)
L68:
  mov    -0x54(%rbp),%eax
  cmp    -0x70(%rbp),%eax
  jl     L12
  mov    %rbx,%rsp
  addl   $0x1,-0x5c(%rbp)
L26:
  mov    -0x5c(%rbp),%eax
  cmp    -0x70(%rbp),%eax
  jl     L112
  mov    -0x60(%rbp),%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L33
  call   <__stack_chk_fail@plt>
L33:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int max_subarray_optimal(int array[], int width, int height) {
  int max = 0;
  int current = 0;
  for (int row = 0; row < height; row++) {
    int column_sums[width];
    for (int i = 0; i < width; i++) {
      column_sums[i] = 0;
    }
    for (int r = row; r < height; r++) {
      for (int c = 0; c < width; c++) {
        column_sums[c] += array[r * width + c];
      }
      current = max_subarray(column_sums, width);
      if (current > max)
        max = current;
    }
  }
  return max;
}
```