user: 请将以下的汇编代码转换成C语言代码:

```asm
<check>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1d0,%rsp
  mov    %rdi,-0x1b8(%rbp)
  mov    %esi,-0x1bc(%rbp)
  mov    %edx,-0x1c0(%rbp)
  mov    %ecx,-0x1c4(%rbp)
  mov    %r8d,-0x1c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1a4(%rbp)
  movl   $0x0,-0x1a0(%rbp)
  jmp    L51
L200:
  mov    -0x1a0(%rbp),%eax
  cltq
  movl   $0x0,-0x90(%rbp,%rax,4)
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x90(%rbp,%rax,4),%edx
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    %edx,-0x110(%rbp,%rax,4)
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,4),%edx
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    %edx,-0x190(%rbp,%rax,4)
  addl   $0x1,-0x1a0(%rbp)
L51:
  cmpl   $0x1f,-0x1a0(%rbp)
  jle    L200
  movl   $0x0,-0x1a0(%rbp)
  jmp    L126
L58:
  mov    -0x1a0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  movzbl %al,%eax
  movslq %eax,%rdx
  mov    -0x90(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  mov    %edx,-0x90(%rbp,%rax,4)
  mov    -0x1a0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  movslq %eax,%rdx
  mov    -0x110(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  mov    %edx,-0x110(%rbp,%rax,4)
  mov    -0x1a0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sar    $0x10,%eax
  movzbl %al,%eax
  movslq %eax,%rdx
  mov    -0x190(%rbp,%rdx,4),%edx
  add    $0x1,%edx
  cltq
  mov    %edx,-0x190(%rbp,%rax,4)
  addl   $0x1,-0x1a0(%rbp)
L126:
  mov    -0x1a0(%rbp),%eax
  cmp    -0x1bc(%rbp),%eax
  jl     L58
  movl   $0x0,-0x1a0(%rbp)
  jmp    L196
L122:
  cmpl   $0x0,-0x1c0(%rbp)
  je     L42
  mov    -0x190(%rbp),%eax
  mov    %eax,-0x19c(%rbp)
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,4),%eax
  cmp    %eax,-0x19c(%rbp)
  je     L144
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x19c(%rbp),%edx
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L144
L42:
  cmpl   $0x0,-0x1a0(%rbp)
  je     L144
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,4),%eax
  test   %eax,%eax
  je     L144
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L144:
  cmpl   $0x0,-0x1c4(%rbp)
  je     L171
  mov    -0x110(%rbp),%eax
  mov    %eax,-0x198(%rbp)
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,4),%eax
  cmp    %eax,-0x198(%rbp)
  je     L159
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x198(%rbp),%edx
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L159
L171:
  cmpl   $0x0,-0x1a0(%rbp)
  je     L159
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,4),%eax
  test   %eax,%eax
  je     L159
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L159:
  cmpl   $0x0,-0x1c8(%rbp)
  je     L207
  mov    -0x90(%rbp),%eax
  mov    %eax,-0x194(%rbp)
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x90(%rbp,%rax,4),%eax
  cmp    %eax,-0x194(%rbp)
  je     L69
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x194(%rbp),%edx
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D43(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L69
L207:
  cmpl   $0x0,-0x1a0(%rbp)
  je     L69
  mov    -0x1a0(%rbp),%eax
  cltq
  mov    -0x90(%rbp,%rax,4),%eax
  test   %eax,%eax
  je     L69
  movl   $0x1,-0x1a4(%rbp)
  mov    -0x1a0(%rbp),%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L69:
  addl   $0x1,-0x1a0(%rbp)
L196:
  cmpl   $0x1f,-0x1a0(%rbp)
  jle    L122
  mov    -0x1a4(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L189
  call   <__stack_chk_fail@plt>
L189:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D23
data_type: string
name: disassemble_data
arguments: label: D34
data_type: string
name: disassemble_data
arguments: label: D36
data_type: string
name: disassemble_data
arguments: label: D52
data_type: string
name: disassemble_data
arguments: label: D43
data_type: string
name: disassemble_data
arguments: label: D8
data_type: string

tool: D23: gang %d not used %d times


tool: D34: gang %d unexpectedly used


tool: D36: worker %d not used %d times


tool: D52: worker %d unexpectedly used


tool: D43: vector %d not used %d times


tool: D8: vector %d unexpectedly used


assistant: ```c
int check(const int *ary, int size, int gp, int wp, int vp) {
  int exit = 0;
  int ix;
  int gangs[32], workers[32], vectors[32];
  for (ix = 0; ix < 32; ix++)
    gangs[ix] = workers[ix] = vectors[ix] = 0;
  for (ix = 0; ix < size; ix++) {
    vectors[ary[ix] & 0xff]++;
    workers[(ary[ix] >> 8) & 0xff]++;
    gangs[(ary[ix] >> 16) & 0xff]++;
  }
  for (ix = 0; ix < 32; ix++) {
    if (gp) {
      int expect = gangs[0];
      if (gangs[ix] != expect) {
        exit = 1;
        printf("gang %d not used %d times\n", ix, expect);
      }
    } else if (ix && gangs[ix]) {
      exit = 1;
      printf("gang %d unexpectedly used\n", ix);
    }
    if (wp) {
      int expect = workers[0];
      if (workers[ix] != expect) {
        exit = 1;
        printf("worker %d not used %d times\n", ix, expect);
      }
    } else if (ix && workers[ix]) {
      exit = 1;
      printf("worker %d unexpectedly used\n", ix);
    }
    if (vp) {
      int expect = vectors[0];
      if (vectors[ix] != expect) {
        exit = 1;
        printf("vector %d not used %d times\n", ix, expect);
      }
    } else if (ix && vectors[ix]) {
      exit = 1;
      printf("vector %d unexpectedly used\n", ix);
    }
  }
  return exit;
}
```