user: Translate the below assembly code into C programming language:

```asm
<evaluate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  movl   $0x0,-0x28(%rbp)
  cmpl   $0x0,-0x4c(%rbp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L537
L516:
  movl   $0x0,-0x2c(%rbp)
  movb   $0x0,-0x35(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L261
L561:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movsbl -0x35(%rbp),%eax
  cmp    %eax,%edx
  jne    L150
  addl   $0x1,-0x2c(%rbp)
  jmp    L233
L150:
  cmpl   $0x4,-0x2c(%rbp)
  jle    L174
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  add    %eax,-0x28(%rbp)
L174:
  movl   $0x1,-0x2c(%rbp)
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
L233:
  addl   $0x1,-0x30(%rbp)
L261:
  mov    -0x30(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L561
  cmpl   $0x4,-0x2c(%rbp)
  jle    L351
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  add    %eax,-0x28(%rbp)
L351:
  addl   $0x1,-0x34(%rbp)
L537:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L516
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L607
L397:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x2c(%rbp)
  movb   $0x0,-0x35(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L183
L548:
  mov    -0xc(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movsbl -0x35(%rbp),%eax
  cmp    %eax,%edx
  jne    L182
  addl   $0x1,-0x2c(%rbp)
  jmp    L43
L182:
  cmpl   $0x4,-0x2c(%rbp)
  jle    L288
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  add    %eax,-0x28(%rbp)
L288:
  movl   $0x1,-0x2c(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
L43:
  cmpb   $0x0,-0x35(%rbp)
  je     L638
  addl   $0x1,-0x24(%rbp)
L638:
  addl   $0x1,-0x34(%rbp)
L183:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L548
  cmpl   $0x4,-0x2c(%rbp)
  jle    L598
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  add    %eax,-0x28(%rbp)
L598:
  addl   $0x1,-0x30(%rbp)
L607:
  mov    -0x30(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L397
  movl   $0x0,-0x34(%rbp)
  jmp    L154
L379:
  movl   $0x0,-0x30(%rbp)
  jmp    L301
L296:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L111
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L111
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L111
  addl   $0x3,-0x28(%rbp)
L111:
  addl   $0x1,-0x30(%rbp)
L301:
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L296
  addl   $0x1,-0x34(%rbp)
L154:
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x34(%rbp)
  jl     L379
  movl   $0x0,-0x34(%rbp)
  jmp    L377
L286:
  movl   $0x0,-0x30(%rbp)
  jmp    L322
L276:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L432
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L432
  mov    -0x30(%rbp),%eax
  add    $0x2,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L432
  mov    -0x30(%rbp),%eax
  add    $0x3,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L432
  mov    -0x30(%rbp),%eax
  add    $0x4,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L432
  mov    -0x30(%rbp),%eax
  add    $0x5,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L432
  mov    -0x30(%rbp),%eax
  add    $0x6,%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L432
  movl   $0x0,-0x14(%rbp)
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L648
L275:
  cmpl   $0x0,-0x1c(%rbp)
  jns    L647
  movl   $0x4,-0x14(%rbp)
  jmp    L488
L647:
  mov    -0x1c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L28
  addl   $0x1,-0x14(%rbp)
  subl   $0x1,-0x1c(%rbp)
L648:
  mov    -0x30(%rbp),%eax
  sub    $0x4,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L275
  jmp    L488
L28:
  nop
L488:
  cmpl   $0x4,-0x14(%rbp)
  jne    L680
  addl   $0x28,-0x28(%rbp)
  jmp    L336
L680:
  movl   $0x0,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x7,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L424
L480:
  mov    -0x20(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L330
  movl   $0x4,-0x18(%rbp)
  jmp    L46
L330:
  mov    -0x20(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L97
  addl   $0x1,-0x18(%rbp)
  addl   $0x1,-0x20(%rbp)
L424:
  mov    -0x30(%rbp),%eax
  add    $0xa,%eax
  cmp    %eax,-0x20(%rbp)
  jle    L480
  jmp    L46
L97:
  nop
L46:
  cmpl   $0x4,-0x18(%rbp)
  jne    L336
  addl   $0x28,-0x28(%rbp)
L336:
  addl   $0x3,-0x30(%rbp)
L432:
  addl   $0x1,-0x30(%rbp)
L322:
  mov    -0x4c(%rbp),%eax
  sub    $0x6,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L276
  addl   $0x1,-0x34(%rbp)
L377:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L286
  movl   $0x0,-0x30(%rbp)
  jmp    L563
L458:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L536
L315:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    $0x7,%edx
  lea    D38(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcmp@plt>
  test   %rax,%rax
  jne    L129
  movl   $0x0,-0x14(%rbp)
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L5
L232:
  cmpl   $0x0,-0x1c(%rbp)
  jns    L117
  movl   $0x4,-0x14(%rbp)
  jmp    L423
L117:
  mov    -0xc(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L160
  addl   $0x1,-0x14(%rbp)
  subl   $0x1,-0x1c(%rbp)
L5:
  mov    -0x34(%rbp),%eax
  sub    $0x4,%eax
  cmp    %eax,-0x1c(%rbp)
  jge    L232
  jmp    L423
L160:
  nop
L423:
  cmpl   $0x4,-0x14(%rbp)
  jne    L454
  addl   $0x28,-0x28(%rbp)
  jmp    L623
L454:
  movl   $0x0,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  add    $0x7,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L490
L356:
  mov    -0x20(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L678
  movl   $0x4,-0x18(%rbp)
  jmp    L44
L678:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L403
  addl   $0x1,-0x18(%rbp)
  addl   $0x1,-0x20(%rbp)
L490:
  mov    -0x34(%rbp),%eax
  add    $0xa,%eax
  cmp    %eax,-0x20(%rbp)
  jle    L356
  jmp    L44
L403:
  nop
L44:
  cmpl   $0x4,-0x18(%rbp)
  jne    L623
  addl   $0x28,-0x28(%rbp)
L623:
  addl   $0x3,-0x34(%rbp)
L129:
  addl   $0x1,-0x34(%rbp)
L536:
  mov    -0x4c(%rbp),%eax
  sub    $0x6,%eax
  cmp    %eax,-0x34(%rbp)
  jl     L315
  addl   $0x1,-0x30(%rbp)
L563:
  mov    -0x30(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L458
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  movsd  D45(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x4c(%rbp),%eax
  imul   %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D19(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D29(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  D49(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D38
type_guessed: string
name: retrieve_data
arguments: tag: D45
type_guessed: f64
name: retrieve_data
arguments: tag: D19
type_guessed: f64
name: retrieve_data
arguments: tag: D29
type_guessed: qword
name: retrieve_data
arguments: tag: D49
type_guessed: f64

tool: D38: 

tool: D45: 100

tool: D19: 50

tool: D29: 9223372036854775807

tool: D49: 5

assistant: ```c
int evaluate(unsigned char *local, const int size) {
  static const unsigned char h1011101[7] = {1, 0, 1, 1, 1, 0, 1};
  int x, y, r, k, block;
  int result = 0;
  char state;
  int dark_mods;
  double percentage;
  int a, b, afterCount, beforeCount;
  assert(size > 0);
  for (x = 0; x < size; x++) {
    block = 0;
    state = 0;
    for (y = 0; y < size; y++) {
      if (local[(y * size) + x] == state) {
        block++;
      } else {
        if (block >= 5) {
          result += block - 2;
        }
        block = 1;
        state = local[(y * size) + x];
      }
    }
    if (block >= 5) {
      result += block - 2;
    }
  }
  dark_mods = 0;
  for (y = 0; y < size; y++) {
    r = y * size;
    block = 0;
    state = 0;
    for (x = 0; x < size; x++) {
      if (local[r + x] == state) {
        block++;
      } else {
        if (block >= 5) {
          result += block - 2;
        }
        block = 1;
        state = local[r + x];
      }
      if (state) {
        dark_mods++;
      }
    }
    if (block >= 5) {
      result += block - 2;
    }
  }
  for (x = 0; x < size - 1; x++) {
    for (y = 0; y < size - 1; y++) {
      k = local[(y * size) + x];
      if (((k == local[((y + 1) * size) + x]) && (k == local[(y * size) + (x + 1)])) && (k == local[((y + 1) * size) + (x + 1)])) {
        result += 3;
      }
    }
  }
  for (x = 0; x < size; x++) {
    for (y = 0; y <= (size - 7); y++) {
      if (local[y * size + x] && !local[(y + 1) * size + x] && local[(y + 2) * size + x] && local[(y + 3) * size + x] && local[(y + 4) * size + x] && !local[(y + 5) * size + x] && local[(y + 6) * size + x]) {
        beforeCount = 0;
        for (b = (y - 1); b >= (y - 4); b--) {
          if (b < 0) {
            beforeCount = 4;
            break;
          }
          if (local[(b * size) + x]) {
            break;
          }
          beforeCount++;
        }
        if (beforeCount == 4) {
          result += 40;
        } else {
          afterCount = 0;
          for (a = (y + 7); a <= (y + 10); a++) {
            if (a >= size) {
              afterCount = 4;
              break;
            }
            if (local[(a * size) + x]) {
              break;
            }
            afterCount++;
          }
          if (afterCount == 4) {
            result += 40;
          }
        }
        y += 3;
      }
    }
  }
  for (y = 0; y < size; y++) {
    r = y * size;
    for (x = 0; x <= (size - 7); x++) {
      if (memcmp(local + r + x, h1011101, 7) == 0) {
        beforeCount = 0;
        for (b = (x - 1); b >= (x - 4); b--) {
          if (b < 0) {
            beforeCount = 4;
            break;
          }
          if (local[r + b]) {
            break;
          }
          beforeCount++;
        }
        if (beforeCount == 4) {
          result += 40;
        } else {
          afterCount = 0;
          for (a = (x + 7); a <= (x + 10); a++) {
            if (a >= size) {
              afterCount = 4;
              break;
            }
            if (local[r + a]) {
              break;
            }
            afterCount++;
          }
          if (afterCount == 4) {
            result += 40;
          }
        }
        x += 3;
      }
    }
  }
  percentage = (100.0 * dark_mods) / (size * size);
  k = (int)(fabs(percentage - 50.0) / 5.0);
  result += 10 * k;
  return result;
}
```