user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x50(%rbp)
  movl   $0x1f4,-0x4c(%rbp)
  movl   $0x64,-0x48(%rbp)
  movl   $0x1f4,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x21,-0x34(%rbp)
  jmp    L71
L247:
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x54(%rbp),%rcx
  lea    -0x55(%rbp),%rdx
  lea    D22(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  jne    L116
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  jle    L116
  movzbl -0x55(%rbp),%eax
  movsbl %al,%eax
  cmp    $0x75,%eax
  je     L248
  cmp    $0x75,%eax
  jg     L71
  cmp    $0x72,%eax
  je     L19
  cmp    $0x72,%eax
  jg     L71
  cmp    $0x4c,%eax
  je     L218
  cmp    $0x6c,%eax
  jne    L71
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L31
L19:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x48(%rbp)
  jmp    L31
L248:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L31
L218:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  nop
L31:
  jmp    L71
L116:
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x54(%rbp),%rcx
  lea    -0x55(%rbp),%rdx
  lea    D7(%rip),%rsi
  mov    %rax,%rdi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  jne    L87
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  js     L87
  movzbl -0x55(%rbp),%eax
  movsbl %al,%eax
  cmp    $0x73,%eax
  je     L68
  cmp    $0x73,%eax
  jg     L71
  cmp    $0x70,%eax
  je     L94
  cmp    $0x70,%eax
  jg     L71
  cmp    $0x69,%eax
  je     L192
  cmp    $0x6d,%eax
  jne    L71
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L171
L192:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  jmp    L171
L68:
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    %eax,-0x50(%rbp)
  jmp    L171
L94:
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  nop
L171:
  jmp    L71
L87:
  mov    $0x0,%eax
  call   <usage@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L71:
  addq   $0x8,-0x70(%rbp)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L247
  cmpl   $0x0,-0x38(%rbp)
  je     L23
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <read_labels@plt>
  mov    %rax,-0x20(%rbp)
  jmp    L101
L23:
  mov    -0x4c(%rbp),%eax
  mov    $0x18,%edx
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <gen_labels@plt>
  mov    %rax,-0x20(%rbp)
L101:
  mov    -0x34(%rbp),%edx
  mov    -0x48(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <genrights@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%esi
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <make_the_rules@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L290
L72:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  cltd
  idivl  -0x4c(%rbp)
  mov    %eax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltd
  idivl  -0x4c(%rbp)
  mov    %edx,-0x24(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L51
L260:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <alea@plt>
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  addl   $0x1,-0x2c(%rbp)
L51:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L260
  addl   $0x1,-0x30(%rbp)
L290:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L72
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D22
datatype: string
name: parse_data
arguments: tag: D7
datatype: string
name: parse_data
arguments: tag: D21
datatype: string

tool: D22: %1[lLru]=%d

tool: D7: %1[misp]=%d

tool: D21: %s %s %s


assistant: ```c
int main(int argc, char **argv) {
  int shuffle = 0;
  int lab_cnt = 500;
  int rig_cnt = 100;
  int rul_cnt = 500;
  int lab_max = rul_cnt * 2;
  int mer_cnt = 0;
  int lab_stdin = 0;
  int permodif = 33;
  char **labels;
  char **rights, c;
  int n, r, m, sub, obj;
  int *rules;
  while (*++argv) {
    if (sscanf(*argv, "%1[lLru]=%d", &c, &n) == 2 && n > 0) {
      switch (c) {
      case 'l':
        lab_cnt = n;
        break;
      case 'r':
        rig_cnt = n;
        break;
      case 'u':
        rul_cnt = n;
        break;
      case 'L':
        lab_max = n;
        break;
      }
    } else if (sscanf(*argv, "%1[misp]=%d", &c, &n) == 2 && n >= 0) {
      switch (c) {
      case 'm':
        mer_cnt = n;
        break;
      case 'i':
        lab_stdin = n;
        break;
      case 's':
        shuffle = !!n;
        break;
      case 'p':
        permodif = n;
        break;
      }
    } else {
      usage();
      exit(1);
    }
  }
  if (lab_stdin)
    labels = read_labels(lab_cnt);
  else
    labels = gen_labels(lab_cnt, 4, 24);
  rights = genrights(rig_cnt, permodif);
  rules = make_the_rules(lab_cnt, lab_max, rul_cnt, shuffle);
  for (r = 0; r < rul_cnt; r++) {
    n = rules[r];
    sub = n / lab_cnt;
    obj = n % lab_cnt;
    for (m = 0; m <= mer_cnt; m++)
      printf("%s %s %s\n", labels[sub], labels[obj], rights[alea(rig_cnt)]);
  }
  return 0;
}
```