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

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

tool_calls: name: disassemble_data
arguments: tag: D8
datatype: string
name: disassemble_data
arguments: tag: D14
datatype: string
name: disassemble_data
arguments: tag: D11
datatype: string
name: disassemble_data
arguments: tag: D24
datatype: string

tool: 

tool: D14: Click the RIGHT button to begin

tool: D11: Click on: %4d %4d

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