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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movl   $0xb,(%rsp)
  movl   $0x7,0x4(%rsp)
  lea    0x4(%rsp),%rsi
  mov    %rsp,%rdi
  lea    D7(%rip),%rdx
  call   <initgraph@plt>
  mov    $0x0,%edi
  call   <setbkcolor@plt>
  mov    $0x4,%edi
  call   <setcolor@plt>
  mov    $0x0,%eax
  call   <cleardevice@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   <settextjustify@plt>
  mov    $0x0,%eax
  call   <getmaxy@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getmaxx@plt>
  mov    %ebx,%esi
  shr    $0x1f,%esi
  add    %ebx,%esi
  sar    %esi
  mov    %eax,%edx
  shr    $0x1f,%edx
  lea    (%rdx,%rax,1),%edi
  sar    %edi
  lea    D24(%rip),%rdx
  call   <outtextxy@plt>
L24:
  mov    $0x3,%edi
  call   <ismouseclick@plt>
  test   %eax,%eax
  je     L24
  lea    0xc(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  mov    $0x3,%edi
  call   <getmouseclick@plt>
  mov    $0x0,%eax
  call   <cleardevice@plt>
  lea    0x10(%rsp),%rbp
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%edx
  lea    D37(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    $0x0,%eax
  call   <getmaxy@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getmaxx@plt>
  mov    %ebx,%esi
  shr    $0x1f,%esi
  add    %ebx,%esi
  sar    %esi
  mov    %eax,%edx
  shr    $0x1f,%edx
  lea    (%rdx,%rax,1),%edi
  sar    %edi
  mov    %rbp,%rdx
  call   <outtextxy@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    $0x0,%eax
  call   <cleardevice@plt>
  mov    $0x14,%ecx
  mov    $0xc8,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <rectangle@plt>
  mov    $0x2,%esi
  mov    $0x0,%edi
  call   <settextjustify@plt>
  lea    D17(%rip),%rdx
  mov    $0x4,%esi
  mov    $0xc,%edi
  call   <outtextxy@plt>
  mov    $0x3,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <setlinestyle@plt>
  mov    $0xf,%ebp
L73:
  mov    $0x0,%eax
  call   <kbhit@plt>
  test   %eax,%eax
  jne    L80
  mov    $0x0,%eax
  call   <mouseclick@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L73
  mov    $0x0,%eax
  call   <mousex@plt>
  cmp    $0xc7,%eax
  jg     L67
  mov    $0x0,%eax
  call   <mousey@plt>
  cmp    $0x13,%eax
  jle    L80
L67:
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r13d
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%edi
  movslq %r13d,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %r13d,%eax
  sar    $0x7,%eax
  mov    %r13d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  mov    %r13d,%edx
  sub    %ecx,%edx
  movslq %r12d,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %r12d,%eax
  sar    $0x7,%eax
  mov    %r12d,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  mov    %r12d,%esi
  sub    %ecx,%esi
  movslq %edi,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %edi,%eax
  sar    $0x7,%eax
  mov    %edi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  sub    %ecx,%edi
  call   <COLOR@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rdx
  imul   $0x2e8ba2e9,%rdx,%rdx
  sar    $0x21,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,4),%ecx
  lea    (%rdx,%rcx,2),%edx
  sub    %edx,%eax
  lea    0x1(%rax),%edi
  mov    %r12d,%esi
  call   <setfillstyle@plt>
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r13d
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%edi
  movslq %r13d,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %r13d,%eax
  sar    $0x7,%eax
  mov    %r13d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  mov    %r13d,%edx
  sub    %ecx,%edx
  movslq %r12d,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %r12d,%eax
  sar    $0x7,%eax
  mov    %r12d,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  mov    %r12d,%esi
  sub    %ecx,%esi
  movslq %edi,%rax
  imul   $0xffffffff80808081,%rax,%rax
  shr    $0x20,%rax
  add    %edi,%eax
  sar    $0x7,%eax
  mov    %edi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x8,%ecx
  sub    %eax,%ecx
  sub    %ecx,%edi
  call   <COLOR@plt>
  mov    %eax,%edi
  call   <setcolor@plt>
  mov    $0x0,%eax
  call   <rand@plt>
  test   $0x1,%al
  jne    L89
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r14d
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %eax,%r13d
  mov    $0x0,%eax
  call   <mousey@plt>
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <mousex@plt>
  mov    %eax,%edi
  mov    %r14d,%eax
  cltd
  idiv   %ebp
  imul   %ebx,%edx
  lea    0x5(%rdx),%ecx
  mov    %r13d,%eax
  cltd
  idiv   %ebp
  imul   %ebx,%edx
  add    $0x5,%edx
  mov    %r12d,%esi
  call   <fillellipse@plt>
  jmp    L73
L89:
  mov    $0x0,%eax
  call   <mousey@plt>
  imul   $0xa,%ebx,%ebx
  lea    (%rax,%rbx,1),%r14d
  mov    $0x0,%eax
  call   <mousex@plt>
  lea    (%rbx,%rax,1),%r13d
  mov    $0x0,%eax
  call   <mousey@plt>
  sub    %ebx,%eax
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <mousex@plt>
  sub    %ebx,%eax
  mov    %eax,%edi
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  call   <bar@plt>
  jmp    L73
L80:
  mov    $0x0,%eax
  call   <closegraph@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  mov    $0x0,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D7
data_type: string
name: unpack_data
arguments: tag: D24
data_type: string
name: unpack_data
arguments: tag: D37
data_type: string
name: unpack_data
arguments: tag: D17
data_type: string

tool: 

tool: D24: Click the RIGHT button to begin

tool: D37: Click on: %4d %4d

tool: D17: Click around (or here to exit)

assistant: ```c
int main(void) {
  int gd, gm, c, p, x, y;
  char s[20];
  gd = 11;
  gm = 7;
  initgraph(&gd, &gm, "");
  setbkcolor(0);
  setcolor(4);
  cleardevice();
  settextjustify(1, 1);
  outtextxy(getmaxx() / 2, getmaxy() / 2, "Click the RIGHT button to begin");
  while (!ismouseclick(3))
    ;
  getmouseclick(3, &x, &y);
  cleardevice();
  sprintf(s, "Click on: %4d %4d", x, y);
  outtextxy(getmaxx() / 2, getmaxy() / 2, s);
  sleep(2);
  cleardevice();
  rectangle(0, 0, 200, 20);
  settextjustify(0, 2);
  outtextxy(12, 4, "Click around (or here to exit)");
  setlinestyle(0, 0, 3);
  while (!kbhit()) {
    if (p = mouseclick())
      if ((mousex() < 200) && (mousey() < 20))
        break;
      else {
        setfillstyle(1 + (rand() % (12 - 1)), COLOR((rand() % (255)), (rand() % (255)), (rand() % (255))));
        setcolor(COLOR((rand() % (255)), (rand() % (255)), (rand() % (255))));
        if (0 == (rand() % (2)))
          fillellipse(mousex(), mousey(), 5 + p * (rand() % (15)), 5 + p * (rand() % (15)));
        else
          bar(mousex() - p * 10, mousey() - p * 10, mousex() + p * 10, mousey() + p * 10);
      }
  }
  closegraph();
  return 0;
}
```