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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    0x8(%rsi),%rdi
  test   %rdi,%rdi
  je     L98
  lea    0x8(%rsi),%rbx
  movl   $0x21,0x2c(%rsp)
  movl   $0x0,0x18(%rsp)
  mov    $0x0,%r15d
  movl   $0x3e8,0x8(%rsp)
  mov    $0x1f4,%r14d
  movl   $0x64,0x10(%rsp)
  movl   $0x1f4,0x14(%rsp)
  movl   $0x0,0x28(%rsp)
  lea    0x34(%rsp),%r12
  lea    0x33(%rsp),%rbp
  lea    D27(%rip),%r13
  jmp    L245
L24:
  cmp    $0x75,%al
  cmove  %edx,%r14d
  jmp    L258
L12:
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D12(%rip),%rsi
  mov    (%rbx),%rdi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  jne    L46
  mov    0x34(%rsp),%edx
  test   %edx,%edx
  js     L46
  movzbl 0x33(%rsp),%eax
  cmp    $0x70,%al
  je     L225
  jg     L4
  cmp    $0x69,%al
  je     L137
  cmp    $0x6d,%al
  cmove  %edx,%r15d
  jmp    L258
L4:
  cmp    $0x73,%al
  jne    L258
  test   %edx,%edx
  setne  %al
  movzbl %al,%eax
  mov    %eax,0x28(%rsp)
  jmp    L258
L46:
  mov    $0x0,%eax
  call   <usage@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L258:
  add    $0x8,%rbx
  mov    (%rbx),%rdi
  test   %rdi,%rdi
  je     L190
L245:
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    %r13,%rsi
  call   <sscanf@plt>
  cmp    $0x2,%eax
  jne    L12
  mov    0x34(%rsp),%edx
  test   %edx,%edx
  jle    L12
  movzbl 0x33(%rsp),%eax
  cmp    $0x72,%al
  je     L272
  jg     L24
  cmp    $0x4c,%al
  je     L224
  cmp    $0x6c,%al
  cmovne 0x14(%rsp),%edx
  mov    %edx,0x14(%rsp)
  jmp    L258
L272:
  mov    %edx,0x10(%rsp)
  jmp    L258
L224:
  mov    %edx,0x8(%rsp)
  jmp    L258
L225:
  mov    %edx,0x2c(%rsp)
  jmp    L258
L137:
  mov    %edx,0x18(%rsp)
  jmp    L258
L190:
  cmpl   $0x0,0x18(%rsp)
  je     L65
  mov    0x14(%rsp),%edi
  call   <read_labels@plt>
  mov    %rax,0x20(%rsp)
L161:
  mov    0x2c(%rsp),%esi
  mov    0x10(%rsp),%edi
  call   <genrights@plt>
  mov    %rax,%r13
  mov    0x28(%rsp),%ecx
  mov    %r14d,%edx
  mov    0x8(%rsp),%esi
  mov    0x14(%rsp),%edi
  call   <make_the_rules@plt>
  test   %r14d,%r14d
  jle    L201
  mov    %rax,0x8(%rsp)
  lea    -0x1(%r14),%edx
  lea    0x4(%rax,%rdx,4),%rax
  mov    %rax,0x18(%rsp)
  lea    D4(%rip),%r14
L103:
  mov    0x8(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x34(%rsp)
  cltd
  idivl  0x14(%rsp)
  test   %r15d,%r15d
  js     L63
  movslq %edx,%rdx
  mov    0x20(%rsp),%rsi
  lea    (%rsi,%rdx,8),%r12
  cltq
  lea    (%rsi,%rax,8),%rbp
  mov    $0x0,%ebx
L239:
  mov    0x10(%rsp),%edi
  call   <alea@plt>
  mov    0x0(%r13,%rax,8),%rcx
  mov    (%r12),%rdx
  mov    0x0(%rbp),%rsi
  mov    %r14,%rdi
  call   <printf@plt>
  add    $0x1,%ebx
  cmp    %r15d,%ebx
  jle    L239
L63:
  addq   $0x4,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    0x18(%rsp),%rax
  jne    L103
L201:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  mov    $0x0,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  movl   $0x21,0x2c(%rsp)
  mov    $0x0,%r15d
  movl   $0x3e8,0x8(%rsp)
  mov    $0x1f4,%r14d
  movl   $0x64,0x10(%rsp)
  movl   $0x1f4,0x14(%rsp)
  movl   $0x0,0x28(%rsp)
L65:
  mov    $0x18,%edx
  mov    $0x4,%esi
  mov    0x14(%rsp),%edi
  call   <gen_labels@plt>
  mov    %rax,0x20(%rsp)
  jmp    L161
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D27
datatype: string
name: extract_symbolic_data
arguments: data_tag: D12
datatype: string
name: extract_symbolic_data
arguments: data_tag: D4
datatype: string

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

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

tool: D4: %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;
}
```