user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<validation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  movl   $0x2,-0x70(%rbp)
  movl   $0x4,-0x6c(%rbp)
  movl   $0x8,-0x68(%rbp)
  movl   $0x5,-0x64(%rbp)
  movl   $0xa,-0x60(%rbp)
  movl   $0x9,-0x5c(%rbp)
  movl   $0x7,-0x58(%rbp)
  movl   $0x3,-0x54(%rbp)
  movl   $0x6,-0x50(%rbp)
  movl   $0x0,-0x78(%rbp)
  jmp    L231
L33:
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L172
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L27
L172:
  mov    $0x0,%eax
  jmp    L55
L27:
  addl   $0x1,-0x78(%rbp)
L231:
  cmpl   $0x9,-0x78(%rbp)
  jle    L33
  mov    -0x88(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  cmp    $0x3,%al
  jne    L167
  mov    -0x88(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jle    L167
  mov    $0x0,%eax
  jmp    L55
L167:
  mov    -0x88(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  cmp    $0x33,%al
  jg     L208
  cmpl   $0x0,-0x78(%rbp)
  je     L208
  mov    -0x88(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x35,%al
  jle    L125
L208:
  mov    $0x0,%eax
  jmp    L55
L125:
  mov    -0x88(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  je     L242
  mov    -0x88(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x33,%al
  je     L242
  mov    -0x88(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x35,%al
  jne    L20
L242:
  mov    -0x88(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x32,%al
  jle    L20
  mov    $0x0,%eax
  jmp    L55
L20:
  movl   $0x0,-0x78(%rbp)
  jmp    L123
L73:
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    -0x78(%rbp),%eax
  cltq
  mov    %edx,-0x40(%rbp,%rax,4)
  cmpl   $0x9,-0x78(%rbp)
  jg     L196
  mov    -0x78(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,4),%edx
  mov    -0x78(%rbp),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%eax
  imul   %edx,%eax
  add    %eax,-0x74(%rbp)
L196:
  addl   $0x1,-0x78(%rbp)
L123:
  cmpl   $0x9,-0x78(%rbp)
  jle    L73
  mov    -0x74(%rbp),%edx
  movslq %edx,%rax
  imul   $0x2e8ba2e9,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  sub    %eax,%edx
  mov    %edx,-0x74(%rbp)
  cmpl   $0x9,-0x74(%rbp)
  jg     L144
  mov    -0x1c(%rbp),%eax
  cmp    %eax,-0x74(%rbp)
  je     L144
  mov    $0x0,%eax
  jmp    L55
L144:
  cmpl   $0xa,-0x74(%rbp)
  jne    L70
  mov    -0x1c(%rbp),%eax
  test   %eax,%eax
  je     L70
  mov    $0x0,%eax
  jmp    L55
L70:
  mov    $0x1,%eax
L55:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L257
  call   <__stack_chk_fail@plt>
L257:
  leave
  ret
```

assistant: ```c
int validation(char *EGN) {
  int counter = 0, cont = 0, chisla[12];
  int weights[9] = {2, 4, 8, 5, 10, 9, 7, 3, 6};
  for (counter = 0; counter < 10; counter++) {
    if (EGN[counter] < '0' || EGN[counter] > '9') {
      return 0;
    }
  }
  if (EGN[4] == 3 && EGN[5] > '1') {
    return 0;
  }
  if (EGN[4] > '3' || counter == 0 || EGN[2] >= '6') {
    return 0;
  }
  if (EGN[2] == '1' || EGN[2] == '3' || EGN[2] == '5')
    if (EGN[3] > '2') {
      return 0;
    }
  counter = 0;
  while (counter < 10) {
    chisla[counter] = EGN[counter] - 48;
    if (counter < 10) {
      cont = cont + (weights[counter] * chisla[counter]);
    }
    counter++;
  }
  cont = cont % 11;
  if (cont < 10)
    if (chisla[9] != cont) {
      return 0;
    }
  if (cont == 10)
    if (chisla[9] != 0) {
      return 0;
    }
  return 1;
}
```