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

```asm
<Chk>:
  endbr64
  push   %r15
  xor    %edx,%edx
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  mov    %rdi,%rax
  lea    0x43(%rsp),%r11
  lea    0x3e(%rsp),%r10
  mov    %edi,0x35(%rsp)
  lea    0x39(%rsp),%r9
  lea    0x34(%rsp),%r8
  mov    %esi,0x3a(%rsp)
  mov    %r11,%rcx
  mov    %r8,%rdi
  mov    %r11,0x28(%rsp)
  mov    %r10,0x20(%rsp)
  mov    %r9,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  div    %rsi
  movb   $0x4,0x34(%rsp)
  movb   $0x4,0x39(%rsp)
  mov    %r9,%rsi
  mov    %rdx,0x8(%rsp)
  mov    %r10,%rdx
  mov    %rax,%r15
  call   <LInt_Div@plt>
  movzbl 0x3e(%rsp),%eax
  mov    0x10(%rsp),%r8
  mov    0x18(%rsp),%r9
  mov    0x20(%rsp),%r10
  test   %al,%al
  mov    0x28(%rsp),%r11
  je     L455
  movzbl 0x3f(%rsp),%r13d
  cmp    $0x1,%al
  je     L455
  movzbl 0x40(%rsp),%edx
  shl    $0x8,%rdx
  add    %rdx,%r13
  cmp    $0x2,%al
  je     L455
  movzbl 0x41(%rsp),%edx
  shl    $0x10,%rdx
  add    %rdx,%r13
  cmp    $0x3,%al
  jbe    L455
  movzbl 0x42(%rsp),%eax
  shl    $0x18,%rax
  add    %rax,%r13
L455:
  movzbl 0x43(%rsp),%eax
  xor    %r14d,%r14d
  test   %al,%al
  je     L251
  movzbl 0x44(%rsp),%r14d
  cmp    $0x1,%al
  je     L251
  movzbl 0x45(%rsp),%edx
  shl    $0x8,%rdx
  add    %rdx,%r14
  cmp    $0x2,%al
  je     L251
  movzbl 0x46(%rsp),%edx
  shl    $0x10,%rdx
  add    %rdx,%r14
  cmp    $0x3,%al
  jbe    L251
  movzbl 0x47(%rsp),%eax
  shl    $0x18,%rax
  add    %rax,%r14
L251:
  cmp    %r15,%r13
  jne    L402
  cmp    0x8(%rsp),%r14
  jne    L402
L100:
  movzbl 0x34(%rsp),%eax
  test   %eax,%eax
  je     L207
  movslq %eax,%rdx
  movzbl 0x34(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L217
  mov    %eax,%ecx
  sub    $0x1,%ecx
  je     L436
  movslq %ecx,%rdx
  movzbl 0x34(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L192
  mov    %eax,%ecx
  sub    $0x2,%ecx
  je     L436
  movslq %ecx,%rdx
  movzbl 0x34(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L192
  mov    %eax,%ecx
  sub    $0x3,%ecx
  je     L436
  movslq %ecx,%rdx
  movzbl 0x34(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L192
  sub    $0x4,%eax
  je     L436
  movslq %eax,%rdx
  movzbl 0x34(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L217
L436:
  movzbl 0x39(%rsp),%eax
  mov    %dl,0x34(%rsp)
  test   %eax,%eax
  je     L82
  movslq %eax,%rdx
  movzbl 0x39(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L159
  mov    %eax,%ecx
  sub    $0x1,%ecx
  je     L388
  movslq %ecx,%rdx
  movzbl 0x39(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L88
  mov    %eax,%ecx
  sub    $0x2,%ecx
  je     L388
  movslq %ecx,%rdx
  movzbl 0x39(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L88
  mov    %eax,%ecx
  sub    $0x3,%ecx
  je     L388
  movslq %ecx,%rdx
  movzbl 0x39(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L88
  sub    $0x4,%eax
  je     L388
  movslq %eax,%rdx
  movzbl 0x39(%rsp,%rdx,1),%edx
  test   %dl,%dl
  jne    L159
L388:
  mov    %dl,0x39(%rsp)
  mov    %r11,%rcx
  mov    %r10,%rdx
  mov    %r9,%rsi
  mov    %r8,%rdi
  xor    %r13d,%r13d
  call   <LInt_Div@plt>
  movzbl 0x3e(%rsp),%eax
  test   %al,%al
  je     L43
  movzbl 0x3f(%rsp),%r13d
  cmp    $0x1,%al
  je     L43
  movzbl 0x40(%rsp),%edx
  shl    $0x8,%rdx
  add    %rdx,%r13
  cmp    $0x2,%al
  je     L43
  movzbl 0x41(%rsp),%edx
  shl    $0x10,%rdx
  add    %rdx,%r13
  cmp    $0x3,%al
  jbe    L43
  movzbl 0x42(%rsp),%eax
  shl    $0x18,%rax
  add    %rax,%r13
L43:
  movzbl 0x43(%rsp),%eax
  xor    %r14d,%r14d
  test   %al,%al
  je     L73
  movzbl 0x44(%rsp),%r14d
  cmp    $0x1,%al
  je     L73
  movzbl 0x45(%rsp),%edx
  shl    $0x8,%rdx
  add    %rdx,%r14
  cmp    $0x2,%al
  je     L73
  movzbl 0x46(%rsp),%edx
  shl    $0x10,%rdx
  add    %rdx,%r14
  cmp    $0x3,%al
  jbe    L73
  movzbl 0x47(%rsp),%eax
  shl    $0x18,%rax
  add    %rax,%r14
L73:
  cmp    %r15,%r13
  jne    L315
  xor    %eax,%eax
  cmp    0x8(%rsp),%r14
  jne    L315
L200:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L129
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L88:
  mov    %ecx,%eax
L159:
  mov    %eax,%edx
  jmp    L388
  nopl   0x0(%rax)
L192:
  mov    %ecx,%eax
L217:
  mov    %eax,%edx
  jmp    L436
  nopl   0x0(%rax)
L402:
  movabs $0x346dc5d63886594b,%r12
  mov    %rbp,%rax
  mov    %r10,0x20(%rsp)
  mul    %r12
  mov    %r9,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r11,0x28(%rsp)
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%rcx
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rsi
  mul    %rbp
  mov    %rdx,%rax
  mov    %ebp,%edx
  sub    %ecx,%edx
  shr    $0x1a,%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  lea    D62(%rip),%rdi
  sub    %esi,%edx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rax
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%rcx
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rsi
  mul    %rbx
  mov    %rdx,%rax
  mov    %ebx,%edx
  sub    %ecx,%edx
  shr    $0x1a,%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  lea    D45(%rip),%rdi
  sub    %esi,%edx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r15,%rax
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%rcx
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rsi
  mul    %r15
  mov    %rdx,%rax
  mov    %r15d,%edx
  shr    $0x1a,%rax
  sub    %ecx,%edx
  mov    %edx,%ecx
  mov    %edi,%edx
  lea    D7(%rip),%rdi
  sub    %esi,%edx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  mov    0x8(%rsp),%r11
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%rcx
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rsi
  mul    %r11
  mov    %rdx,%rax
  mov    %r11d,%edx
  sub    %ecx,%edx
  shr    $0x1a,%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  lea    D21(%rip),%rdi
  sub    %esi,%edx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rax
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%rcx
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rsi
  mul    %r13
  sub    %ecx,%r13d
  mov    %r13d,%ecx
  mov    %rdx,%rax
  mov    %edi,%edx
  lea    D7(%rip),%rdi
  shr    $0x1a,%rax
  sub    %esi,%edx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rax
  mul    %r12
  shr    $0xb,%rdx
  mov    %rdx,%rax
  imul   $0x2710,%rdx,%rcx
  mov    %rdx,%r13
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rdi
  mul    %r14
  sub    %ecx,%r14d
  xor    %eax,%eax
  mov    %r14d,%ecx
  mov    %rdx,%rsi
  mov    %r13d,%edx
  sub    %edi,%edx
  shr    $0x1a,%rsi
  lea    D55(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%r11
  mov    0x20(%rsp),%r10
  mov    0x18(%rsp),%r9
  mov    0x10(%rsp),%r8
  jmp    L100
  nopl   0x0(%rax)
L315:
  movabs $0x346dc5d63886594b,%r12
  mov    %rbp,%rax
  mov    %ebp,%ecx
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%r10
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  sub    %r10d,%ecx
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%r9
  mul    %rbp
  xor    %eax,%eax
  lea    D7(%rip),%rbp
  mov    %rdx,%rsi
  mov    %edi,%edx
  lea    D63(%rip),%rdi
  sub    %r9d,%edx
  shr    $0x1a,%rsi
  call   <printf@plt>
  mov    %rbx,%rax
  mov    %ebx,%ecx
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%r10
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  sub    %r10d,%ecx
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%r9
  mul    %rbx
  xor    %eax,%eax
  mov    %rdx,%rsi
  mov    %edi,%edx
  lea    D45(%rip),%rdi
  sub    %r9d,%edx
  shr    $0x1a,%rsi
  call   <printf@plt>
  mov    %r15,%rax
  mov    %r15d,%ecx
  mul    %r12
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%r10
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%r9
  mul    %r15
  mov    %rdx,%rsi
  mov    %edi,%edx
  mov    %rbp,%rdi
  shr    $0x1a,%rsi
  sub    %r10d,%ecx
  sub    %r9d,%edx
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rax
  mov    0x8(%rsp),%rbx
  mul    %r12
  mov    %ebx,%ecx
  mov    %rdx,%rdi
  shr    $0xb,%rdi
  mov    %rdi,%rax
  imul   $0x2710,%rdi,%r10
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  sub    %r10d,%ecx
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%r9
  mul    %rbx
  xor    %eax,%eax
  mov    %rdx,%rsi
  mov    %edi,%edx
  lea    D21(%rip),%rdi
  sub    %r9d,%edx
  shr    $0x1a,%rsi
  call   <printf@plt>
  mov    %r13,%rax
  mov    %r13d,%ecx
  mul    %r12
  shr    $0xb,%rdx
  mov    %rdx,%rax
  imul   $0x2710,%rdx,%r10
  mov    %rdx,%r9
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  sub    %r10d,%ecx
  shr    $0xb,%rdx
  imul   $0x2710,%rdx,%rdi
  mul    %r13
  xor    %eax,%eax
  mov    %rdx,%rsi
  mov    %r9d,%edx
  sub    %edi,%edx
  shr    $0x1a,%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %r14,%rax
  mov    %r14d,%ecx
  mul    %r12
  shr    $0xb,%rdx
  mov    %rdx,%rax
  imul   $0x2710,%rdx,%r10
  mov    %rdx,%r9
  mul    %r12
  movabs $0xabcc77118461cefd,%rax
  mov    %rdx,%r8
  shr    $0xb,%r8
  mul    %r14
  sub    %r10d,%ecx
  xor    %eax,%eax
  imul   $0x2710,%r8,%rdi
  mov    %rdx,%rsi
  mov    %r9d,%edx
  sub    %edi,%edx
  shr    $0x1a,%rsi
  lea    D55(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L200
L82:
  xor    %edx,%edx
  jmp    L388
L207:
  xor    %edx,%edx
  jmp    L436
L129:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D62
type_guessed: string
name: read_data
arguments: tag: D45
type_guessed: string
name: read_data
arguments: tag: D7
type_guessed: string
name: read_data
arguments: tag: D21
type_guessed: string
name: read_data
arguments: tag: D55
type_guessed: string
name: read_data
arguments: tag: D63
type_guessed: string

tool: D62: 
Warning! %2d%04d%04d /

tool: D45:  %2d%04d%04d =

tool: D7:  %2d%04d%04d ..

tool: D21:  %2d%04d%04d but

tool: D55:  %2d%04d%04d


tool: D63: 
Error! %2d%04d%04d /

assistant: ```c
char Chk(unsigned long A, unsigned long B) {
  unsigned long C, D, C2, D2;
  int Cnt;
  unsigned char Rtn, A1[5], B1[5], C1[5], D1[5];
  char LInt_Div(unsigned char *, unsigned char *, unsigned char *, unsigned char *);
  C = A / B;
  D = A % B;
  A1[0] = (char)4;
  B1[0] = (char)4;
  A1[1] = (char)(A % 256);
  B1[1] = (char)(B % 256);
  A1[2] = (char)((A / 256) % 256);
  B1[2] = (char)((B / 256) % 256);
  A1[3] = (char)((A / 65536) % 256);
  B1[3] = (char)((B / 65536) % 256);
  A1[4] = (char)(A / 16777216);
  B1[4] = (char)(B / 16777216);
  LInt_Div(A1, B1, C1, D1);
  if ((int)C1[0] > 0) {
    C2 = (long)C1[1];
    if (C1[0] > (char)1)
      C2 += (unsigned long)C1[2] * 256;
    if (C1[0] > (char)2)
      C2 += (unsigned long)C1[3] * 65536;
    if (C1[0] > (char)3)
      C2 += (unsigned long)C1[4] * 16777216;
  } else
    C2 = 0;
  if ((int)D1[0] > 0) {
    D2 = (long)D1[1];
    if (D1[0] > (char)1)
      D2 += (unsigned long)D1[2] * 256;
    if (D1[0] > (char)2)
      D2 += (unsigned long)D1[3] * 65536;
    if (D1[0] > (char)3)
      D2 += (unsigned long)D1[4] * 16777216;
  } else
    D2 = 0;
  if (C != C2 || D != D2) {
    printf("\nWarning! %2d%04d%04d /", (int)(A / 100000000), (int)(A / 10000 % 10000), (int)(A % 10000));
    printf(" %2d%04d%04d =", (int)(B / 100000000), (int)(B / 10000 % 10000), (int)(B % 10000));
    printf(" %2d%04d%04d ..", (int)(C / 100000000), (int)(C / 10000 % 10000), (int)(C % 10000));
    printf(" %2d%04d%04d but", (int)(D / 100000000), (int)(D / 10000 % 10000), (int)(D % 10000));
    printf(" %2d%04d%04d ..", (int)(C2 / 100000000), (int)(C2 / 10000 % 10000), (int)(C2 % 10000));
    printf(" %2d%04d%04d\n", (int)(D2 / 100000000), (int)(D2 / 10000 % 10000), (int)(D2 % 10000));
  }
  for (Cnt = (int)A1[0]; Cnt != 0 && A1[Cnt] == (char)0; Cnt--)
    ;
  A1[0] = (char)Cnt;
  for (Cnt = (int)B1[0]; Cnt != 0 && B1[Cnt] == (char)0; Cnt--)
    ;
  B1[0] = (char)Cnt;
  LInt_Div(A1, B1, C1, D1);
  if ((int)C1[0] > 0) {
    C2 = (long)C1[1];
    if (C1[0] > (char)1)
      C2 += (unsigned long)C1[2] * 256;
    if (C1[0] > (char)2)
      C2 += (unsigned long)C1[3] * 65536;
    if (C1[0] > (char)3)
      C2 += (unsigned long)C1[4] * 16777216;
  } else
    C2 = 0;
  if ((int)D1[0] > 0) {
    D2 = (long)D1[1];
    if (D1[0] > (char)1)
      D2 += (unsigned long)D1[2] * 256;
    if (D1[0] > (char)2)
      D2 += (unsigned long)D1[3] * 65536;
    if (D1[0] > (char)3)
      D2 += (unsigned long)D1[4] * 16777216;
  } else
    D2 = 0;
  if (C != C2 || D != D2) {
    printf("\nError! %2d%04d%04d /", (int)(A / 100000000), (int)(A / 10000 % 10000), (int)(A % 10000));
    printf(" %2d%04d%04d =", (int)(B / 100000000), (int)(B / 10000 % 10000), (int)(B % 10000));
    printf(" %2d%04d%04d ..", (int)(C / 100000000), (int)(C / 10000 % 10000), (int)(C % 10000));
    printf(" %2d%04d%04d but", (int)(D / 100000000), (int)(D / 10000 % 10000), (int)(D % 10000));
    printf(" %2d%04d%04d ..", (int)(C2 / 100000000), (int)(C2 / 10000 % 10000), (int)(C2 % 10000));
    printf(" %2d%04d%04d\n", (int)(D2 / 100000000), (int)(D2 / 10000 % 10000), (int)(D2 % 10000));
    return (char)1;
  }
  return (char)0;
}
```