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

```asm
<maximalRectangle>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  movslq %edx,%r12
  push   %rbp
  mov    %rdi,%rbp
  lea    0x0(,%r12,4),%edi
  mov    %r12,%r15
  push   %rbx
  mov    %esi,%ebx
  sub    $0x148,%rsp
  call   <malloc@plt>
  mov    %rax,%r13
  test   %r12d,%r12d
  jle    L313
  lea    0x0(,%r12,4),%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <memset@plt>
L313:
  test   %ebx,%ebx
  jle    L282
  mov    %r15d,%r12d
  lea    -0x1(%rbx),%eax
  xor    %r14d,%r14d
  and    $0xfffffff0,%r12d
  lea    0x8(%rbp,%rax,8),%rax
  lea    0x2(%r12),%esi
  movslq %r12d,%rbx
  mov    %rax,0x8(%rsp)
  mov    %r15d,%eax
  movslq %esi,%rdi
  mov    %esi,0x5c(%rsp)
  lea    0x0(%r13,%rbx,4),%rdx
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rdi,0x68(%rsp)
  mov    %rsi,(%rsp)
  lea    0x3(%r12),%esi
  movslq %esi,%rdi
  mov    %esi,0x80(%rsp)
  lea    0x4(%r12),%esi
  mov    %rdi,0x78(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rdi,0x10(%rsp)
  movslq %esi,%rdi
  mov    %esi,0x84(%rsp)
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rsi,0x30(%rsp)
  lea    0x5(%r12),%esi
  mov    %rdi,0x90(%rsp)
  movslq %esi,%rdi
  mov    %esi,0xa8(%rsp)
  lea    0x6(%r12),%esi
  mov    %rdi,0xa0(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rdi,0x48(%rsp)
  movslq %esi,%rdi
  mov    %esi,0xac(%rsp)
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rsi,0x60(%rsp)
  lea    0x7(%r12),%esi
  mov    %rdi,0xb8(%rsp)
  movslq %esi,%rdi
  mov    %esi,0xd0(%rsp)
  lea    0x8(%r12),%esi
  mov    %rdi,0xc8(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rdi,0x70(%rsp)
  movslq %esi,%rdi
  mov    %esi,0xd4(%rsp)
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rsi,0x88(%rsp)
  lea    0x9(%r12),%esi
  mov    %rdi,0xe0(%rsp)
  movslq %esi,%rdi
  mov    %esi,0xf8(%rsp)
  lea    0xa(%r12),%esi
  mov    %rdi,0xf0(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rbx,0x38(%rsp)
  lea    0x1(%r12),%ebx
  mov    %rdi,0x98(%rsp)
  movslq %esi,%rdi
  mov    %rax,0x18(%rsp)
  lea    0x0(%r13,%rax,4),%rax
  mov    %ebx,0x44(%rsp)
  movslq %ebx,%rbx
  mov    %esi,0xfc(%rsp)
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rax,0x20(%rsp)
  mov    %r15d,%eax
  mov    %rbx,0x50(%rsp)
  shr    $0x4,%eax
  lea    0x0(%r13,%rbx,4),%rbx
  mov    %rdi,0x108(%rsp)
  sub    $0x1,%eax
  mov    %rsi,0xb0(%rsp)
  lea    0xb(%r12),%esi
  add    $0x1,%rax
  movdqa D22(%rip),%xmm5
  movslq %esi,%rdi
  mov    %esi,0x118(%rsp)
  lea    0xc(%r12),%esi
  shl    $0x4,%rax
  movdqa D0(%rip),%xmm8
  mov    %esi,0x11c(%rsp)
  mov    %rdi,0x110(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rdi,0xc0(%rsp)
  movslq %esi,%rdi
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rdi,0x120(%rsp)
  mov    %rsi,0xd8(%rsp)
  lea    0xd(%r12),%esi
  movslq %esi,%rdi
  mov    %esi,0x130(%rsp)
  lea    0xe(%r12),%esi
  mov    %rdi,0x128(%rsp)
  lea    0x0(%r13,%rdi,4),%rdi
  mov    %rdi,0xe8(%rsp)
  movslq %esi,%rdi
  mov    %esi,0x134(%rsp)
  lea    0x0(%r13,%rdi,4),%rsi
  mov    %rdi,0x138(%rsp)
  mov    %rsi,0x100(%rsp)
  mov    %rax,0x28(%rsp)
  mov    %r15d,%eax
  mov    %r13,%r15
  mov    %rbp,%r13
  mov    %r12d,0x40(%rsp)
  mov    %eax,%ebp
  mov    %r14d,%r12d
  mov    %rdx,%r14
L167:
  test   %ebp,%ebp
  jle    L439
  mov    0x0(%r13),%r10
  mov    0x18(%rsp),%rsi
  lea    -0x1(%rbp),%eax
  lea    (%r10,%rsi,1),%rcx
  cmp    %rcx,%r15
  setae  %cl
  cmp    0x20(%rsp),%r10
  setae  %r11b
  or     %r11b,%cl
  je     L106
  cmp    $0xe,%eax
  jbe    L106
  mov    0x28(%rsp),%rsi
  mov    %r10,%rcx
  mov    %r15,%rax
  pxor   %xmm7,%xmm7
  pxor   %xmm6,%xmm6
  lea    (%rsi,%r10,1),%r11
L345:
  movdqu (%rcx),%xmm0
  movdqa %xmm7,%xmm9
  movdqa %xmm6,%xmm10
  movdqu 0x10(%rax),%xmm4
  movdqu 0x20(%rax),%xmm3
  movdqu 0x30(%rax),%xmm2
  add    $0x10,%rcx
  add    $0x40,%rax
  pcmpeqb %xmm8,%xmm0
  paddd  %xmm5,%xmm4
  paddd  %xmm5,%xmm3
  paddd  %xmm5,%xmm2
  pcmpeqb %xmm7,%xmm0
  pcmpgtb %xmm0,%xmm9
  movdqa %xmm0,%xmm1
  punpcklbw %xmm9,%xmm1
  punpckhbw %xmm9,%xmm0
  movdqu -0x40(%rax),%xmm9
  pcmpgtw %xmm1,%xmm10
  movdqa %xmm1,%xmm11
  paddd  %xmm5,%xmm9
  punpckhwd %xmm10,%xmm1
  punpcklwd %xmm10,%xmm11
  movdqa %xmm6,%xmm10
  pcmpgtw %xmm0,%xmm10
  pand   %xmm1,%xmm4
  movdqa %xmm0,%xmm1
  pand   %xmm11,%xmm9
  movups %xmm4,-0x30(%rax)
  movups %xmm9,-0x40(%rax)
  punpcklwd %xmm10,%xmm1
  punpckhwd %xmm10,%xmm0
  pand   %xmm3,%xmm1
  pand   %xmm2,%xmm0
  movups %xmm1,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %r11,%rcx
  jne    L345
  cmp    0x40(%rsp),%ebp
  je     L439
  mov    0x38(%rsp),%rdi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdi,1)
  je     L275
  mov    (%r14),%eax
  add    $0x1,%eax
L275:
  mov    %eax,(%r14)
  cmp    0x44(%rsp),%ebp
  jle    L439
  mov    0x50(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L86
  mov    (%rbx),%eax
  add    $0x1,%eax
L86:
  mov    %eax,(%rbx)
  cmp    0x5c(%rsp),%ebp
  jle    L439
  mov    0x68(%rsp),%rsi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rsi,1)
  je     L168
  mov    (%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L168:
  mov    (%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0x80(%rsp),%ebp
  jle    L439
  mov    0x78(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L68
  mov    0x10(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L68:
  mov    0x10(%rsp),%rsi
  mov    %eax,(%rsi)
  cmp    0x84(%rsp),%ebp
  jle    L439
  mov    0x90(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L264
  mov    0x30(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L264:
  mov    0x30(%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0xa8(%rsp),%ebp
  jle    L439
  mov    0xa0(%rsp),%rsi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rsi,1)
  je     L310
  mov    0x48(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L310:
  mov    0x48(%rsp),%rdx
  mov    %eax,(%rdx)
  cmp    0xac(%rsp),%ebp
  jle    L439
  mov    0xb8(%rsp),%rdi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdi,1)
  je     L97
  mov    0x60(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L97:
  mov    0x60(%rsp),%rsi
  mov    %eax,(%rsi)
  cmp    0xd0(%rsp),%ebp
  jle    L439
  mov    0xc8(%rsp),%rdi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdi,1)
  je     L366
  mov    0x70(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L366:
  mov    0x70(%rsp),%rdx
  mov    %eax,(%rdx)
  cmp    0xd4(%rsp),%ebp
  jle    L439
  mov    0xe0(%rsp),%rsi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rsi,1)
  je     L331
  mov    0x88(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L331:
  mov    0x88(%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0xf8(%rsp),%ebp
  jle    L439
  mov    0xf0(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L384
  mov    0x98(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L384:
  mov    0x98(%rsp),%rdx
  mov    %eax,(%rdx)
  cmp    0xfc(%rsp),%ebp
  jle    L439
  mov    0x108(%rsp),%rsi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rsi,1)
  je     L161
  mov    0xb0(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L161:
  mov    0xb0(%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0x118(%rsp),%ebp
  jle    L439
  mov    0x110(%rsp),%rsi
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rsi,1)
  je     L46
  mov    0xc0(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L46:
  mov    0xc0(%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0x11c(%rsp),%ebp
  jle    L439
  mov    0x120(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L419
  mov    0xd8(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L419:
  mov    0xd8(%rsp),%rsi
  mov    %eax,(%rsi)
  cmp    0x130(%rsp),%ebp
  jle    L439
  mov    0x128(%rsp),%rdx
  xor    %eax,%eax
  cmpb   $0x30,(%r10,%rdx,1)
  je     L14
  mov    0xe8(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L14:
  mov    0xe8(%rsp),%rdi
  mov    %eax,(%rdi)
  cmp    0x134(%rsp),%ebp
  jle    L439
  mov    0x138(%rsp),%rax
  cmpb   $0x30,(%r10,%rax,1)
  je     L410
  mov    0x100(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x58(%rsp)
  add    $0x1,%eax
L101:
  mov    0x100(%rsp),%rdx
  mov    %eax,(%rdx)
  nop
L439:
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <largestRectangleArea@plt>
  movdqa D22(%rip),%xmm5
  movdqa D0(%rip),%xmm8
  cmp    %eax,%r12d
  cmovl  %eax,%r12d
  add    $0x8,%r13
  cmp    0x8(%rsp),%r13
  jne    L167
  mov    %r15,%r13
  mov    %r12d,%r14d
L302:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x148,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L106:
  mov    %eax,%ecx
  xor    %eax,%eax
  jmp    L348
  xchg   %ax,%ax
L312:
  addl   $0x1,(%r15,%rax,4)
  lea    0x1(%rax),%rdx
  cmp    %rcx,%rax
  je     L439
L316:
  mov    %rdx,%rax
L348:
  cmpb   $0x30,(%r10,%rax,1)
  jne    L312
  movl   $0x0,(%r15,%rax,4)
  lea    0x1(%rax),%rdx
  cmp    %rcx,%rax
  jne    L316
  jmp    L439
L410:
  xor    %eax,%eax
  jmp    L101
L282:
  xor    %r14d,%r14d
  jmp    L302
```

tool_calls: name: retrieve_data
arguments: label: D22
datatype: byte[16]
name: retrieve_data
arguments: label: D0
datatype: byte[16]

tool: {"D22": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D0": [0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30]}

assistant: ```c
int maximalRectangle(char **matrix, int matrixRowSize, int matrixColSize) {
  int *heights;
  heights = malloc(sizeof(int) * matrixColSize);
  int i, j, area;
  area = 0;
  for (i = 0; i < matrixColSize; ++i) {
    heights[i] = 0;
  }
  for (i = 0; i < matrixRowSize; ++i) {
    for (j = 0; j < matrixColSize; ++j) {
      if (matrix[i][j] == '0')
        heights[j] = 0;
      else
        heights[j]++;
    }
    int new_area;
    new_area = largestRectangleArea(heights, matrixColSize);
    if (new_area > area)
      area = new_area;
  }
  free(heights);
  return area;
}
```