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

```asm
<main>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jg     L152
  movl   $0x3e9,0x4(%rsp)
  mov    $0x3e9,%edx
  mov    $0x1f4,%edi
L136:
  mov    %edi,%ecx
  movdqa D43(%rip),%xmm3
  xor    %eax,%eax
  pxor   %xmm7,%xmm7
  movdqa D31(%rip),%xmm6
  shr    $0x2,%ecx
  pcmpeqd %xmm5,%xmm5
  pxor   %xmm4,%xmm4
  cs nopw 0x0(%rax,%rax,1)
L28:
  movdqa %xmm3,%xmm1
  add    $0x1,%eax
  paddd  %xmm6,%xmm3
  movdqa %xmm1,%xmm2
  movdqa %xmm1,%xmm0
  psrlq  $0x20,%xmm2
  pmuludq %xmm1,%xmm0
  paddd  %xmm5,%xmm1
  pmuludq %xmm2,%xmm2
  pshufd $0x8,%xmm0,%xmm0
  pshufd $0x8,%xmm2,%xmm2
  punpckldq %xmm2,%xmm0
  movdqa %xmm1,%xmm2
  pslld  $0x2,%xmm2
  pslld  $0x2,%xmm0
  psubd  %xmm2,%xmm1
  movdqa %xmm4,%xmm2
  pslld  $0x1,%xmm1
  paddd  %xmm1,%xmm0
  pcmpgtd %xmm0,%xmm2
  movdqa %xmm0,%xmm1
  punpckldq %xmm2,%xmm1
  punpckhdq %xmm2,%xmm0
  paddq  %xmm7,%xmm1
  movdqa %xmm1,%xmm7
  paddq  %xmm0,%xmm7
  cmp    %eax,%ecx
  jne    L28
  movdqa %xmm7,%xmm0
  mov    %edi,%ecx
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%ecx
  paddq  %xmm0,%xmm7
  lea    0x3(%rcx,%rcx,1),%eax
  movq   %xmm7,%rsi
  add    $0x1,%rsi
  cmp    %edi,%ecx
  je     L119
L26:
  lea    -0x1(%rax),%ecx
  mov    %eax,%edi
  imul   $0xfffffffa,%ecx,%ecx
  imul   %eax,%edi
  lea    (%rcx,%rdi,4),%edi
  movslq %edi,%rdi
  add    %rdi,%rsi
  lea    0x2(%rax),%edi
  cmp    %edx,%edi
  jg     L119
  imul   %edi,%edi
  lea    -0xc(%rcx,%rdi,4),%edi
  movslq %edi,%rdi
  add    %rdi,%rsi
  lea    0x4(%rax),%edi
  cmp    %edi,%edx
  jl     L119
  imul   %edi,%edi
  lea    -0x18(%rcx,%rdi,4),%edi
  movslq %edi,%rdi
  add    %rdi,%rsi
  lea    0x6(%rax),%edi
  cmp    %edi,%edx
  jl     L119
  imul   %edi,%edi
  add    $0x8,%eax
  lea    -0x24(%rcx,%rdi,4),%edi
  movslq %edi,%rdi
  add    %rdi,%rsi
  cmp    %eax,%edx
  jl     L119
  imul   %eax,%eax
  lea    -0x30(%rcx,%rax,4),%eax
  cltq
  add    %rax,%rsi
L119:
  lea    D20(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
L107:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L116
  add    $0x18,%rsp
  ret
L152:
  mov    0x8(%rsi),%rdi
  lea    0x4(%rsp),%rdx
  lea    D22(%rip),%rsi
  call   <sscanf@plt>
  test   %eax,%eax
  je     L19
  mov    0x4(%rsp),%edx
  test   $0x1,%dl
  je     L145
L159:
  cmp    $0x2,%edx
  jle    L146
  lea    -0x3(%rdx),%edi
  shr    %edi
  add    $0x1,%edi
  cmp    $0xc,%edx
  jg     L136
  mov    $0x3,%eax
  mov    $0x1,%esi
  jmp    L26
L145:
  lea    0x1(%rdx),%esi
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  mov    %esi,0x4(%rsp)
  call   <printf@plt>
  mov    0x4(%rsp),%edx
  jmp    L159
L146:
  mov    $0x1,%esi
  jmp    L119
L19:
  lea    D46(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L107
L116:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D43
data_type: byte[16]
name: retrieve_data
arguments: label: D31
data_type: byte[16]
name: retrieve_data
arguments: label: D20
data_type: string
name: retrieve_data
arguments: label: D22
data_type: string
name: retrieve_data
arguments: label: D16
data_type: string
name: retrieve_data
arguments: label: D46
data_type: string

tool: {"D43": [0x03,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x09,0x00,0x00,0x00]}

tool: {"D31": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: D20: Problem 28: %lu | MAX_SIZE: %d


tool: D22: %d

tool: D16: The Maximum Size must be an odd number. Using %d as input instead.


tool: D46: Getting user input was unsuccessful.

assistant: ```c
int main(int argc, char *argv[]) {
  long sum = 1;
  int itter;
  int MAX_SIZE;
  if (argc <= 1) {
    MAX_SIZE = 1001;
  } else {
    int success = sscanf(argv[1], "%d", &MAX_SIZE);
    if (success == 0) {
      printf("Getting user input was unsuccessful.\n");
      return 1;
    } else if (MAX_SIZE % 2 == 0) {
      MAX_SIZE++;
      printf("The Maximum Size must be an odd number. Using %d as input instead.\n", MAX_SIZE);
    }
  }
  for (itter = 3; itter <= MAX_SIZE; itter += 2) {
    sum += 4 * itter * itter - 6 * (itter - 1);
  }
  printf("Problem 28: %lu | MAX_SIZE: %d\n", sum, MAX_SIZE);
  return 0;
}
```