user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  xor    %esi,%esi
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    $0xfffffffb,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%rdi
  call   <gettimeofday@plt>
  movl   $0xb,0x8(%rsp)
  mov    $0xb,%eax
  nopl   0x0(%rax,%rax,1)
L49:
  mov    %ebx,%edx
  mov    %ebx,%ebp
  mov    0x8(%rsp),%r12d
  neg    %edx
  imul   %ebx,%ebp
  mov    %edx,0xc(%rsp)
  cmp    $0x3e7,%eax
  jle    L16
  jmp    L35
  cs nopw 0x0(%rax,%rax,1)
L14:
  add    $0x1,%r12d
  add    %r12d,%eax
  cmp    $0x3e7,%eax
  jg     L35
L16:
  lea    (%r12,%rbx,1),%r13d
  mov    %r13d,%r9d
  imul   %r13d,%r9d
  lea    (%r9,%rbp,1),%r14d
  mov    %r14d,%edi
  call   <sqrt@plt>
  lea    (%r12,%rax,1),%ecx
  mov    %eax,%r15d
  cmp    $0x3e8,%ecx
  jne    L14
  mov    %eax,%ecx
  imul   %eax,%ecx
  cmp    %r14d,%ecx
  jne    L14
  mov    %r14d,%eax
L31:
  sub    $0x8,%rsp
  mov    %r14d,%r9d
  mov    %r13d,%r8d
  mov    %r13d,%ecx
  push   %rax
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  push   %r15
  push   %r15
  mov    0x2c(%rsp),%ebx
  mov    %ebx,%edx
  mov    %ebx,%esi
  call   <printf@plt>
  mov    %ebx,%esi
  add    $0x20,%rsp
  xor    %eax,%eax
  imul   %r13d,%esi
  lea    D1(%rip),%rdi
  imul   %r15d,%esi
  call   <printf@plt>
  xor    %esi,%esi
  lea    0x10(%rsp),%rdi
  call   <gettimeofday@plt>
  mov    0x10(%rsp),%esi
  xor    %eax,%eax
  sub    0x14(%rsp),%esi
  lea    D20(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L35:
  mov    $0x1,%eax
  addl   $0x2,0x8(%rsp)
  mov    $0x2,%r8d
  sub    %ebx,%eax
  sub    %ebx,%r8d
  sub    $0x1,%ebx
  mov    %eax,0xc(%rsp)
  mov    0x8(%rsp),%eax
  mov    %r8d,%r13d
  add    %r15d,%eax
  cmp    $0x3e7,%eax
  jle    L49
  mov    %r15d,%eax
  xor    %r14d,%r14d
  imul   %r15d,%eax
  jmp    L31
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D22
type_infered: string
name: unpack_data
arguments: label: D1
type_infered: string
name: unpack_data
arguments: label: D20
type_infered: string

tool: D22: %d*%d + %d*%d = %d = %d*%d = %d


tool: D1: a*b*c = %d

tool: D20: 
took %lu usec


assistant: ```c
int main(void) {
  struct timeval stop, start;
  gettimeofday(&start, NULL);
  int a = 5, b = 6, c = 0, sqrtc = 0;
  int exit = 0;
  while ((a + b + sqrtc) < 1000 && exit == 0) {
    while (a + b + sqrtc < 1000 && exit == 0) {
      c = a * a + b * b;
      sqrtc = (int)sqrt(c);
      if (a + b + sqrtc == 1000 && sqrtc * sqrtc == c) {
        exit = 1;
      } else {
        b++;
      }
    }
    if (!exit) {
      a++;
      b = a + 1;
      c = 0;
    }
  }
  printf("%d*%d + %d*%d = %d = %d*%d = %d\n", a, a, b, b, c, sqrtc, sqrtc, sqrtc * sqrtc);
  printf("a*b*c = %d", a * b * sqrtc);
  gettimeofday(&stop, NULL);
  printf("\ntook %lu usec\n", stop.tv_usec - start.tv_usec);
  return 0;
}
```