user: What is the c source code of the assembly code below:

```asm
<sphincs_sign>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd88,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %rdx,0x30(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xd78(%rsp)
  xor    %eax,%eax
  lea    0x20(%rdx),%rcx
  lea    0x90(%rsp),%rdi
  mov    %rsi,%rdx
  mov    %rbx,%rsi
  call   <prf@plt>
  lea    0xb0(%rsp),%r13
  mov    $0x1,%r12d
  lea    D16(%rip),%r14
  jmp    L242
L42:
  movzbl 0x0(%r13),%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L132:
  add    $0x1,%r12d
  add    $0x1,%r13
L242:
  lea    -0x1(%r12),%eax
  cmp    $0x7,%eax
  jle    L42
  movzbl -0x28(%r13),%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmp    $0x27,%r12d
  jle    L132
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x90(%rsp),%rsi
  lea    0xd0(%rsp),%r12
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <hash_any_n_2n@plt>
  movzbl 0xb0(%rsp),%eax
  and    $0xf,%eax
  or     $0xffffffc0,%eax
  mov    %al,0xb0(%rsp)
  lea    0xb0(%rsp),%rsi
  lea    0x50(%rsp),%rbx
  mov    0x30(%rsp),%rdx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <prf_64@plt>
  mov    0x28(%rsp),%r14
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <horst_sign_opti@plt>
  lea    0x70(%rsp),%rdi
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    $0x0,%eax
  call   <horst_keygen@plt>
  movl   $0x0,0x48(%rsp)
  lea    0xb0(%rsp),%rax
  mov    %rax,0x38(%rsp)
  lea    0x110(%rsp),%rax
  mov    %rax,0x20(%rsp)
  jmp    L100
L17:
  lea    0xb7(%rsp),%rax
L253:
  movzbl (%rax),%edx
  shr    $0x5,%dl
  movzbl -0x1(%rax),%ecx
  shl    $0x3,%ecx
  or     %ecx,%edx
  mov    %dl,(%rax)
  sub    $0x1,%rax
  cmp    0x38(%rsp),%rax
  jne    L253
  movzbl 0x48(%rsp),%eax
  shl    $0x4,%eax
  mov    %al,0xb0(%rsp)
  jmp    L160
L261:
  lea    0x70(%rsp),%rdi
  mov    0x28(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    $0x0,%eax
  call   <wotsp_sign@plt>
  jmp    L3
L106:
  mov    %ebx,%eax
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  shl    $0x5,%eax
  cltq
  add    %r15,%rax
  movslq %ebp,%rdx
  add    %r15,%rdx
  movdqa (%rdx),%xmm0
  movaps %xmm0,(%rax)
  movdqa 0x10(%rdx),%xmm1
  movaps %xmm1,0x10(%rax)
L213:
  add    $0x2,%ebx
  add    $0x40,%ebp
  cmp    %r12d,%ebx
  jge    L36
L184:
  lea    0x1(%rbx),%eax
  cmp    %r12d,%eax
  jge    L106
  lea    0x20(%rbp),%edx
  movslq %edx,%rdx
  add    %r15,%rdx
  movslq %ebp,%rsi
  add    %r15,%rsi
  mov    %ebx,%edi
  shr    $0x1f,%edi
  add    %ebx,%edi
  sar    %edi
  shl    $0x5,%edi
  movslq %edi,%rdi
  add    %r15,%rdi
  mov    %r13,%rcx
  mov    $0x0,%eax
  call   <hash_nn_n_mask@plt>
  jmp    L213
L36:
  sub    $0x1,%r12d
  mov    %r12d,%eax
  shr    $0x1f,%eax
  add    %r12d,%eax
  sar    %eax
  lea    0x1(%rax),%r12d
  add    $0x40,%r14
  cmp    %r14,0x8(%rsp)
  je     L135
L110:
  mov    %r14,%r13
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  test   %r12d,%r12d
  jg     L184
  jmp    L36
L135:
  mov    0x18(%rsp),%r14
  mov    $0x0,%eax
L289:
  movzbl (%rax,%r15,1),%edx
  mov    %dl,(%r14,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L289
  addl   $0x1,0x40(%rsp)
  mov    0x40(%rsp),%eax
  add    $0x20,%r14
  cmp    $0x20,%eax
  je     L268
L206:
  movzbl 0xb7(%rsp),%eax
  and    $0xffffffe0,%eax
  mov    0x40(%rsp),%ebx
  or     %ebx,%eax
  mov    %al,0xb7(%rsp)
  mov    0x30(%rsp),%rdx
  mov    0x38(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <prf_64@plt>
  cmp    %ebx,0x44(%rsp)
  je     L261
L3:
  mov    0x28(%rsp),%rbx
  mov    %rbx,%rdx
  mov    0x10(%rsp),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <wotsp_keygen@plt>
  mov    %rbx,%rcx
  add    $0x1c0,%rcx
  mov    %rcx,0x8(%rsp)
  mov    $0x43,%r12d
  mov    %r14,0x18(%rsp)
  mov    %rbx,%r14
  jmp    L110
L268:
  mov    0x28(%rsp),%rax
  lea    0x1c0(%rax),%r15
  movl   $0x5,0x8(%rsp)
  movzbl 0x4f(%rsp),%r14d
  jmp    L232
L149:
  mov    $0x1,%r12d
  movzbl 0x8(%rsp),%ecx
  shl    %cl,%r12d
  test   %r12d,%r12d
  jle    L159
  mov    %r15,%r13
  mov    0x20(%rsp),%rbp
  mov    $0x0,%ebx
L146:
  lea    0x20(%rbp),%rdx
  mov    %ebx,%edi
  shr    $0x1f,%edi
  add    %ebx,%edi
  sar    %edi
  shl    $0x5,%edi
  movslq %edi,%rdi
  add    0x20(%rsp),%rdi
  mov    %r13,%rcx
  mov    %rbp,%rsi
  mov    $0x0,%eax
  call   <hash_nn_n_mask@plt>
  add    $0x2,%ebx
  add    $0x40,%rbp
  cmp    %r12d,%ebx
  jl     L146
L159:
  shr    %r14b
  add    $0x40,%r15
  subl   $0x1,0x8(%rsp)
  je     L249
L232:
  lea    0x1(%r14),%eax
  lea    -0x1(%r14),%edx
  test   $0x1,%r14b
  cmovne %edx,%eax
  mov    %eax,%r14d
  mov    $0x5,%eax
  sub    0x8(%rsp),%eax
  cmp    $0x3,%eax
  jg     L149
  mov    %r14,%rax
  shl    $0x5,%rax
  and    $0x1fe0,%eax
  mov    0x20(%rsp),%rcx
  lea    (%rcx,%rax,1),%rbx
  lea    0x20(%rcx,%rax,1),%rbp
L161:
  movzbl (%rbx),%esi
  lea    D16(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbx,%rbp
  jne    L161
  jmp    L149
L249:
  mov    $0x0,%eax
  mov    0x20(%rsp),%rcx
L224:
  movb   $0x0,0x50(%rsp,%rax,1)
  movzbl (%rax,%rcx,1),%edx
  mov    %dl,0x70(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L224
  addl   $0x1,0x48(%rsp)
  mov    0x48(%rsp),%eax
  cmp    $0xc,%eax
  je     L278
L100:
  andb   $0xf,0xb0(%rsp)
  cmpl   $0x0,0x48(%rsp)
  jne    L17
L160:
  movzbl 0xb7(%rsp),%eax
  mov    %eax,%ecx
  and    $0x1f,%ecx
  mov    %cl,0x4f(%rsp)
  mov    0x20(%rsp),%r14
  movl   $0x0,0x40(%rsp)
  lea    0x50(%rsp),%rcx
  mov    %rcx,0x10(%rsp)
  and    $0x1f,%eax
  mov    %eax,0x44(%rsp)
  lea    0x510(%rsp),%r15
  jmp    L206
L278:
  mov    0xd78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L266
  mov    $0x0,%eax
  add    $0xd88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L266:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D16
datatype: string

tool: D16: %02x

assistant: ```c
int sphincs_sign(unsigned char const *message, unsigned long long length, unsigned char const sk[64], unsigned char const masks[1024]) {
  int a = 0, h = 0, i = 0, j = 0, l = 0;
  unsigned char leafidx = 0;
  unsigned char R[2 * 32];
  unsigned char digest[64];
  unsigned char seed[32];
  unsigned char leaves[32 * 32];
  unsigned char wots_pk[67 * 32];
  unsigned char root[32];
  unsigned char *addr = R + 32;
  prf(R, message, length, sk + 64 / 2);
  for (i = 0; i < 32 + 8; ++i) {
    printf("%02x", R[(i < 8 ? 32 + i : i - 8)]);
  }
  printf("\n");
  hash_any_n_2n(digest, R, message, length);
  addr[0] = (12 << 4) | (addr[0] & 0x0f);
  prf_64(seed, addr, sk);
  horst_sign_opti(digest, seed, masks);
  horst_keygen(root, seed, masks);
  for (a = 0; a < 12; ++a) {
    addr[0] = (addr[0] & 0x0f);
    if (a != 0) {
      for (i = 8 - 1; i > 0; --i) {
        addr[i] = ((addr[i] & 0xe0) >> 5) | ((addr[i - 1] & 0x1f) << 3);
      }
      addr[0] = (a << 4) & 0xf0;
    } else {
      addr[0] = (a << 4) | addr[0];
    }
    leafidx = addr[8 - 1] & 0x1f;
    for (l = 0; l < 32; ++l) {
      addr[8 - 1] = (addr[8 - 1] & 0xe0) | l;
      prf_64(seed, addr, sk);
      if (l == leafidx) {
        wotsp_sign(root, seed, masks);
      }
      wotsp_keygen(wots_pk, seed, masks);
      do {
        for (i = 67, h = 0; i > 1; i = 1 + ((i - 1) / 2), h++) {
          for (j = 0; j < i; j += 2) {
            if (j + 2 > i) {
              memcpy(wots_pk + (j / 2) * 32, wots_pk + (j)*32, 32);
            } else {
              hash_nn_n_mask(wots_pk + (j / 2) * 32, wots_pk + (j)*32, wots_pk + (j + 1) * 32, masks + (2 * h) * 32);
            }
          }
        }
      } while (0);
      for (i = 0; i < 32; ++i) {
        leaves[l * 32 + i] = wots_pk[0 * 32 + i];
      }
    }
    for (i = 0; i < 5; ++i) {
      if ((leafidx & 1) == 0) {
        leafidx += 1;
      } else {
        leafidx -= 1;
      }
      if (i < 5 - 1) {
        for (j = 0; j < 32; ++j) {
          printf("%02x", leaves[leafidx * 32 + j]);
        }
      }
      for (j = 0; j < (1 << (5 - i)); j += 2) {
        hash_nn_n_mask(leaves + (j / 2) * 32, leaves + (j)*32, leaves + (j + 1) * 32, masks + 2 * (7 + i) * 32);
      }
      leafidx /= 2;
    }
    for (i = 0; i < 32; ++i) {
      seed[i] = 0;
      root[i] = leaves[i + 0 * 32];
    }
  }
  return 0;
}
```