user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x48,%rsp
  pxor   %xmm0,%xmm0
  lea    D13(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x2e(%rsp),%rsi
  movaps %xmm0,(%rsp)
  movq   $0x0,0x20(%rsp)
  movaps %xmm0,0x10(%rsp)
  call   <scanf@plt>
  movsbl 0x2e(%rsp),%eax
  movsbl 0x34(%rsp),%esi
  movsbl 0x35(%rsp),%edi
  movsbl 0x36(%rsp),%r8d
  sub    $0x30,%eax
  sub    $0x30,%esi
  cltq
  sub    $0x30,%edi
  sub    $0x30,%r8d
  movl   $0x1,(%rsp,%rax,4)
  movsbl 0x2f(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  movsbl 0x30(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  movsbl 0x31(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  movsbl 0x32(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  movsbl 0x33(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  movslq %esi,%rax
  addl   $0x1,(%rsp,%rax,4)
  movslq %edi,%rax
  addl   $0x1,(%rsp,%rax,4)
  movslq %r8d,%rax
  addl   $0x1,(%rsp,%rax,4)
  movsbl 0x37(%rsp),%eax
  sub    $0x30,%eax
  cltq
  addl   $0x1,(%rsp,%rax,4)
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  jne    L179
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jne    L136
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jne    L65
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jne    L299
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jne    L228
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jne    L214
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L27
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L293
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  jne    L61
  mov    (%rsp),%eax
  xor    %ecx,%ecx
L36:
  mov    %ecx,%edx
  cmp    $0x1,%eax
  je     L238
L182:
  imul   %edx,%edx
  lea    (%rdi,%rdi,4),%eax
  imul   %ecx,%ecx
  lea    (%r8,%rax,2),%eax
  imul   $0x64,%esi,%esi
  add    %ecx,%edx
  add    %esi,%eax
  cmp    %eax,%edx
  je     L148
  lea    D12(%rip),%rdi
  call   <printf@plt>
L197:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L295
  xor    %eax,%eax
  add    $0x48,%rsp
  ret
L148:
  lea    D11(%rip),%rdi
  call   <printf@plt>
  jmp    L197
L238:
  lea    -0x1(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x2(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x3(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x4(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x5(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x6(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x7(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x8(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0x9(%rcx),%edx
  movslq %edx,%rax
  cmpl   $0x0,(%rsp,%rax,4)
  jne    L182
  lea    -0xa(%rcx),%edx
  jmp    L182
L214:
  mov    $0x4,%ecx
  jmp    L36
L179:
  mov    $0x9,%ecx
  jmp    L36
L136:
  mov    $0x8,%ecx
  jmp    L36
L65:
  mov    $0x7,%ecx
  jmp    L36
L299:
  mov    $0x6,%ecx
  jmp    L36
L228:
  mov    $0x5,%ecx
  jmp    L36
L27:
  mov    $0x3,%ecx
  jmp    L36
L293:
  mov    $0x2,%ecx
  jmp    L36
L61:
  mov    $0x1,%ecx
  jmp    L36
L295:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D13
type: string
name: unpack_data
arguments: label: D12
type: string
name: unpack_data
arguments: label: D11
type: string

tool: D13: %s

tool: D12: SPY!


tool: D11: Good Morning!


assistant: ```c
int main(void) {
  char num[10];
  int count[10] = {0}, i, j;
  scanf("%s", num);
  for (i = 0; i < 10; i++)
    count[num[i] - '0']++;
  for (i = 9; count[i] == 0; i--)
    ;
  j = i;
  if (count[i] == 1)
    while (count[--i] == 0)
      ;
  if (i * i + j * j == (num[8] - '0') + 10 * (num[7] - '0') + 100 * (num[6] - '0'))
    printf("Good Morning!\n");
  else
    printf("SPY!\n");
  return 0;
}
```