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

```asm
<score_array>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  movl   $0xffffffff,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L172
L300:
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    $0x0,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  je     L291
  cmpl   $0x0,-0xc(%rbp)
  jns    L234
  mov    -0x18(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L234:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L291:
  addl   $0x2,-0x18(%rbp)
L172:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L300
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x4(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  mov    -0x30(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L296
L53:
  mov    -0x2c(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  je     L295
  cmpl   $0x0,-0xc(%rbp)
  jns    L159
  mov    -0x18(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L159:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L295:
  addl   $0x2,-0x18(%rbp)
L296:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L53
  mov    -0x8(%rbp),%eax
  sub    -0xc(%rbp),%eax
  add    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L102
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L102:
  movl   $0x0,-0x4(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L284
L64:
  mov    -0x14(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %ecx,%r8d
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  je     L247
  cmpl   $0x0,-0xc(%rbp)
  jns    L74
  mov    -0x14(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L74:
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L247:
  addl   $0x2,-0x14(%rbp)
L284:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L64
  mov    -0x8(%rbp),%eax
  sub    -0xc(%rbp),%eax
  add    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L76
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L76:
  movl   $0x0,-0x4(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L179
L301:
  mov    -0x30(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x14(%rbp),%edi
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  je     L307
  cmpl   $0x0,-0xc(%rbp)
  jns    L115
  mov    -0x14(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L115:
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x4(%rbp)
L307:
  addl   $0x2,-0x14(%rbp)
L179:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L301
  mov    -0x8(%rbp),%eax
  sub    -0xc(%rbp),%eax
  add    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L88
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x10(%rbp)
L88:
  movl   $0x0,-0x4(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L129
L145:
  mov    -0x14(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L201
L121:
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x18(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x18(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  je     L154
  mov    -0x18(%rbp),%eax
  lea    -0x2(%rax),%ecx
  mov    -0x14(%rbp),%edi
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%eax
  lea    -0x2(%rax),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x18(%rbp),%eax
  lea    0x2(%rax),%ecx
  mov    -0x14(%rbp),%edi
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
  mov    -0x14(%rbp),%eax
  lea    0x2(%rax),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <get_dot@plt>
  test   %rax,%rax
  jne    L187
L154:
  addl   $0x1,-0x4(%rbp)
L187:
  addl   $0x2,-0x18(%rbp)
L201:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L121
  addl   $0x1,-0x14(%rbp)
L129:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L145
  mov    -0x4(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  sub    %edx,%eax
  leave
  ret
```

assistant: ```c
int score_array(char Dots[], int Hgt, int Wid) {
  int x, y, worstedge, first, last, sum;
  sum = 0;
  first = -1;
  last = -1;
  for (x = 0; x < Wid; x += 2)
    if (get_dot(Dots, Hgt, Wid, x, 0)) {
      if (first < 0) {
        first = x;
      }
      last = x;
      sum++;
    }
  worstedge = sum + last - first;
  worstedge *= Hgt;
  sum = 0;
  first = -1;
  for (x = Wid & 1; x < Wid; x += 2)
    if (get_dot(Dots, Hgt, Wid, x, Hgt - 1)) {
      if (first < 0) {
        first = x;
      }
      last = x;
      sum++;
    }
  sum += last - first;
  sum *= Hgt;
  if (sum < worstedge) {
    worstedge = sum;
  }
  sum = 0;
  first = -1;
  for (y = 0; y < Hgt; y += 2)
    if (get_dot(Dots, Hgt, Wid, 0, y)) {
      if (first < 0) {
        first = y;
      }
      last = y;
      sum++;
    }
  sum += last - first;
  sum *= Wid;
  if (sum < worstedge) {
    worstedge = sum;
  }
  sum = 0;
  first = -1;
  for (y = Hgt & 1; y < Hgt; y += 2)
    if (get_dot(Dots, Hgt, Wid, Wid - 1, y)) {
      if (first < 0) {
        first = y;
      }
      last = y;
      sum++;
    }
  sum += last - first;
  sum *= Wid;
  if (sum < worstedge) {
    worstedge = sum;
  }
  sum = 0;
  for (y = 0; y < Hgt; y++) {
    for (x = y & 1; x < Wid; x += 2) {
      if ((!get_dot(Dots, Hgt, Wid, x - 1, y - 1)) && (!get_dot(Dots, Hgt, Wid, x + 1, y - 1)) && (!get_dot(Dots, Hgt, Wid, x - 1, y + 1)) && (!get_dot(Dots, Hgt, Wid, x + 1, y + 1)) && ((!get_dot(Dots, Hgt, Wid, x, y)) || ((!get_dot(Dots, Hgt, Wid, x - 2, y)) && (!get_dot(Dots, Hgt, Wid, x, y - 2)) && (!get_dot(Dots, Hgt, Wid, x + 2, y)) && (!get_dot(Dots, Hgt, Wid, x, y + 2))))) {
        sum++;
      }
    }
  }
  return (worstedge - sum * sum);
}
```