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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x30(%rsp)
  movl   $0x0,0x34(%rsp)
  movl   $0x80,0x38(%rsp)
  movl   $0x0,0x3c(%rsp)
  movl   $0xc0,0x40(%rsp)
  movl   $0x0,0x44(%rsp)
  movl   $0xe0,0x48(%rsp)
  movl   $0x0,0x4c(%rsp)
  movl   $0xf0,0x50(%rsp)
  movl   $0x0,0x54(%rsp)
  movl   $0xf8,0x58(%rsp)
  movl   $0x0,0x5c(%rsp)
  movl   $0xfc,0x60(%rsp)
  movl   $0x0,0x64(%rsp)
  movl   $0xfe,0x68(%rsp)
  movl   $0x0,0x6c(%rsp)
  movl   $0xff,0x70(%rsp)
  movl   $0x0,0x74(%rsp)
  movl   $0xff,0x78(%rsp)
  movl   $0x80,0x7c(%rsp)
  movl   $0xff,0x80(%rsp)
  movl   $0xc0,0x84(%rsp)
  movl   $0xff,0x88(%rsp)
  movl   $0xe0,0x8c(%rsp)
  movl   $0xff,0x90(%rsp)
  movl   $0xf0,0x94(%rsp)
  movl   $0xff,0xa0(%rsp)
  movl   $0xff,0xa4(%rsp)
  movl   $0x7f,0xa8(%rsp)
  movl   $0xff,0xac(%rsp)
  movl   $0x3f,0xb0(%rsp)
  movl   $0xff,0xb4(%rsp)
  movl   $0x1f,0xb8(%rsp)
  movl   $0xff,0xbc(%rsp)
  movl   $0xf,0xc0(%rsp)
  movl   $0xff,0xc4(%rsp)
  movl   $0x7,0xc8(%rsp)
  movl   $0xff,0xcc(%rsp)
  movl   $0x3,0xd0(%rsp)
  movl   $0xff,0xd4(%rsp)
  movl   $0x1,0xd8(%rsp)
  movl   $0xff,0xdc(%rsp)
  movl   $0x0,0xe0(%rsp)
  movl   $0xff,0xe4(%rsp)
  movl   $0x0,0xe8(%rsp)
  movl   $0x7f,0xec(%rsp)
  movl   $0x0,0xf0(%rsp)
  movl   $0x3f,0xf4(%rsp)
  movl   $0x0,0xf8(%rsp)
  movl   $0x1f,0xfc(%rsp)
  movl   $0x0,0x100(%rsp)
  movl   $0xf,0x104(%rsp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <srand@plt>
  movl   $0x4,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  jmp    L13
L124:
  cmp    0x18(%rsp),%ecx
  jne    L86
  cmp    0x1c(%rsp),%r8d
  jne    L86
  addl   $0x1,0xc(%rsp)
  mov    $0x1,%eax
  jmp    L6
L28:
  mov    %r13d,%edx
  mov    %r12d,%esi
  lea    D96(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L78:
  mov    $0xa,%edi
  call   <putchar@plt>
  subl   $0x1,0x8(%rsp)
  je     L62
L13:
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%r12
  imul   $0xffffffff80808081,%r12,%r12
  shr    $0x20,%r12
  add    %eax,%r12d
  sar    $0x7,%r12d
  cltd
  sub    %edx,%r12d
  mov    %r12d,%edx
  shl    $0x8,%edx
  sub    %r12d,%edx
  sub    %edx,%eax
  mov    %eax,%r12d
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%r13
  imul   $0xffffffff80808081,%r13,%r13
  shr    $0x20,%r13
  add    %eax,%r13d
  sar    $0x7,%r13d
  cltd
  sub    %edx,%r13d
  mov    %r13d,%edx
  shl    $0x8,%edx
  sub    %r13d,%edx
  sub    %edx,%eax
  mov    %eax,%r13d
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rbx
  imul   $0xffffffff80808081,%rbx,%rbx
  shr    $0x20,%rbx
  add    %eax,%ebx
  sar    $0x7,%ebx
  cltd
  sub    %edx,%ebx
  mov    %ebx,%edx
  shl    $0x8,%edx
  sub    %ebx,%edx
  sub    %edx,%eax
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%rbp
  imul   $0xffffffff80808081,%rbp,%rbp
  shr    $0x20,%rbp
  add    %eax,%ebp
  sar    $0x7,%ebp
  cltd
  sub    %edx,%ebp
  mov    %ebp,%edx
  shl    $0x8,%edx
  sub    %ebp,%edx
  sub    %edx,%eax
  mov    %eax,%ebp
  mov    $0x0,%eax
  call   <rand@plt>
  movslq %eax,%r14
  imul   $0x4ec4ec4f,%r14,%r14
  sar    $0x22,%r14
  cltd
  sub    %edx,%r14d
  lea    (%r14,%r14,2),%edx
  lea    (%r14,%rdx,4),%edx
  sub    %edx,%eax
  mov    %eax,%r14d
  cltq
  mov    0x30(%rsp,%rax,8),%r15d
  mov    0x34(%rsp,%rax,8),%eax
  mov    %eax,0x4(%rsp)
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  lea    D62(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%r8d
  mov    %r15d,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  lea    D85(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D33(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  lea    0x18(%rsp),%rcx
  lea    0x14(%rsp),%rdx
  lea    0x1c(%rsp),%r8
  lea    D94(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D80(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x20(%rsp),%rsi
  lea    0x28(%rsp),%rcx
  lea    0x24(%rsp),%rdx
  lea    0x2c(%rsp),%r8
  lea    D94(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl %r12b,%esi
  movzbl %r13b,%edx
  mov    %r15d,%ecx
  and    %ebx,%ecx
  mov    0x4(%rsp),%r8d
  and    %ebp,%r8d
  cmp    0x10(%rsp),%esi
  jne    L86
  cmp    0x14(%rsp),%edx
  je     L124
L86:
  lea    D86(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
L6:
  movslq %r14d,%r14
  or     0xa0(%rsp,%r14,8),%ebx
  mov    %ebx,%ecx
  mov    %ebp,%r8d
  or     0xa4(%rsp,%r14,8),%r8d
  cmp    0x20(%rsp),%r12d
  jne    L28
  cmp    0x24(%rsp),%r13d
  jne    L28
  cmp    0x28(%rsp),%ebx
  jne    L28
  cmp    0x2c(%rsp),%r8d
  jne    L28
  addl   $0x1,0xc(%rsp)
  cmp    $0x1,%eax
  jne    L78
  lea    D49(%rip),%rdi
  call   <puts@plt>
  jmp    L78
L62:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xc(%rsp),%xmm0
  mulsd  D17(%rip),%xmm0
  mulsd  D119(%rip),%xmm0
  lea    D112(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  mov    $0x0,%eax
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D96
type_infered: string
name: parse_data
arguments: data_tag: D62
type_infered: string
name: parse_data
arguments: data_tag: D85
type_infered: string
name: parse_data
arguments: data_tag: D33
type_infered: string
name: parse_data
arguments: data_tag: D94
type_infered: string
name: parse_data
arguments: data_tag: D80
type_infered: string
name: parse_data
arguments: data_tag: D86
type_infered: string
name: parse_data
arguments: data_tag: D49
type_infered: string
name: parse_data
arguments: data_tag: D17
type_infered: byte[8]
name: parse_data
arguments: data_tag: D119
type_infered: byte[8]
name: parse_data
arguments: data_tag: D112
type_infered: string

tool: D96: Broadcast address is incorrect! The answer is %d.%d.%d.%d


tool: D62: IP address : %d.%d.%d.%d


tool: D85: Subnet mask: %d.%d.%d.%d


tool: D33: Network address: 

tool: D94: %d.%d.%d.%d

tool: D80: Broadcast address: 

tool: D86: Network address is incorrect! The answer is %d.%d.%d.%d


tool: D49: Good job!

tool: {"D17": [0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3f]}

tool: {"D119": [0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x40]}

tool: D112: Your score: %.1f


assistant: ```c
int main(int argc, char **argv) {
  int count, correctAnswers = 0;
  int ip[4], subnet[4];
  int tmpsubnet[13][2] = {{0, 0}, {128, 0}, {192, 0}, {224, 0}, {240, 0}, {248, 0}, {252, 0}, {254, 0}, {255, 0}, {255, 128}, {255, 192}, {255, 224}, {255, 240}};
  int tmpsubnet2[13][2] = {{255, 255}, {127, 255}, {63, 255}, {31, 255}, {15, 255}, {7, 255}, {3, 255}, {1, 255}, {0, 255}, {0, 127}, {0, 63}, {0, 31}, {0, 15}};
  int usrNetwork[4], usrBcast[4], ansNetwork[4], ansBcast[4];
  int flag, tmp;
  srand(time(0));
  subnet[0] = 255;
  subnet[1] = 255;
  for (count = 0; count < 4; count++) {
    flag = 0;
    ip[0] = rand() % 255;
    ip[1] = rand() % 255;
    ip[2] = rand() % 255;
    ip[3] = rand() % 255;
    tmp = rand() % 13;
    subnet[2] = tmpsubnet[tmp][0];
    subnet[3] = tmpsubnet[tmp][1];
    printf("IP address : %d.%d.%d.%d\n", ip[0], ip[1], ip[2], ip[3]);
    printf("Subnet mask: %d.%d.%d.%d\n", subnet[0], subnet[1], subnet[2], subnet[3]);
    printf("Network address: ");
    scanf("%d.%d.%d.%d", &usrNetwork[0], &usrNetwork[1], &usrNetwork[2], &usrNetwork[3]);
    printf("Broadcast address: ");
    scanf("%d.%d.%d.%d", &usrBcast[0], &usrBcast[1], &usrBcast[2], &usrBcast[3]);
    ansNetwork[0] = ip[0] & subnet[0];
    ansNetwork[1] = ip[1] & subnet[1];
    ansNetwork[2] = ip[2] & subnet[2];
    ansNetwork[3] = ip[3] & subnet[3];
    if ((usrNetwork[0] == ansNetwork[0]) && (usrNetwork[1] == ansNetwork[1]) && (usrNetwork[2] == ansNetwork[2]) && (usrNetwork[3] == ansNetwork[3])) {
      correctAnswers++;
      flag++;
    } else
      printf("Network address is incorrect! The answer is %d.%d.%d.%d\n", ansNetwork[0], ansNetwork[1], ansNetwork[2], ansNetwork[3]);
    ansBcast[0] = ip[0];
    ansBcast[1] = ip[1];
    ansBcast[2] = ip[2] | tmpsubnet2[tmp][0];
    ansBcast[3] = ip[3] | tmpsubnet2[tmp][1];
    if ((usrBcast[0] == ansBcast[0]) && (usrBcast[1] == ansBcast[1]) && (usrBcast[2] == ansBcast[2]) && (usrBcast[3] == ansBcast[3])) {
      correctAnswers++;
      flag++;
    } else
      printf("Broadcast address is incorrect! The answer is %d.%d.%d.%d\n", ip[0], ip[1], ip[2] | tmpsubnet2[tmp][0], ip[3] | tmpsubnet2[tmp][1]);
    if (flag == 2)
      printf("Good job!\n");
    printf("\n");
  }
  printf("Your score: %.1f\n", correctAnswers / 8.0 * 100);
  return 0;
}
```