user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mainloop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd58,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xd48(%rsp)
  xor    %eax,%eax
L52:
  mov    0x30(%rsp),%rbx
  mov    (%rbx,%rax,1),%edx
  mov    %edx,0x240(%rsp,%rax,1)
  add    $0x4,%rax
  cmp    $0x80,%rax
  jne    L52
  movl   $0x1,0x2c0(%rsp)
  lea    0x2c4(%rsp),%rax
  lea    0x340(%rsp),%rdx
L38:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L38
  movl   $0x1,0x340(%rsp)
  lea    0x344(%rsp),%rax
  lea    0x440(%rsp),%rdx
L14:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rdx
  jne    L14
  mov    $0xfe,%ebx
  lea    0x240(%rsp),%rax
  mov    %rax,0x8(%rsp)
L41:
  lea    0x7(%rbx),%eax
  test   %ebx,%ebx
  cmovns %ebx,%eax
  sar    $0x3,%eax
  cltq
  mov    0x38(%rsp),%rcx
  movzbl (%rcx,%rax,1),%eax
  mov    %ebx,%ecx
  and    $0x7,%ecx
  sar    %cl,%eax
  and    $0x1,%eax
  lea    0x340(%rsp),%rdx
  lea    0x540(%rsp),%rbp
  lea    0x440(%rsp),%r12
  mov    %eax,0x14(%rsp)
  mov    %eax,%r8d
  mov    0x8(%rsp),%rcx
  mov    %rdx,0x18(%rsp)
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <select@plt>
  lea    0x4c0(%rsp),%r13
  lea    0x840(%rsp),%r14
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <add@plt>
  lea    0x8c0(%rsp),%r15
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <sub@plt>
  lea    0x5c0(%rsp),%r12
  lea    0x940(%rsp),%r9
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r9,0x20(%rsp)
  mov    %r9,%rdi
  call   <add@plt>
  lea    0x9c0(%rsp),%r10
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r10,0x28(%rsp)
  mov    %r10,%rdi
  call   <sub@plt>
  lea    0xa40(%rsp),%rbp
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <square@plt>
  lea    0xac0(%rsp),%r12
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <square@plt>
  lea    0xb40(%rsp),%r13
  mov    %r15,%rdx
  mov    0x20(%rsp),%rsi
  mov    %r13,%rdi
  call   <mult@plt>
  lea    0xbc0(%rsp),%r15
  mov    %r14,%rdx
  mov    0x28(%rsp),%rsi
  mov    %r15,%rdi
  call   <mult@plt>
  lea    0xc40(%rsp),%r11
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r11,0x20(%rsp)
  mov    %r11,%rdi
  call   <add@plt>
  lea    0xcc0(%rsp),%r14
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <sub@plt>
  lea    0x40(%rsp),%r9
  mov    %r14,%rsi
  mov    %r9,0x28(%rsp)
  mov    %r9,%rdi
  call   <square@plt>
  lea    0xc0(%rsp),%r13
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <sub@plt>
  lea    0x140(%rsp),%r15
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <mult121665@plt>
  lea    0x1c0(%rsp),%r14
  mov    %rbp,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <add@plt>
  lea    0x640(%rsp),%r15
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <mult@plt>
  lea    0x6c0(%rsp),%rdi
  mov    %r14,%rdx
  mov    %r13,%rsi
  call   <mult@plt>
  lea    0x740(%rsp),%rbp
  mov    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <square@plt>
  lea    0x7c0(%rsp),%rdi
  mov    0x30(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  call   <mult@plt>
  mov    0x14(%rsp),%r8d
  mov    %rbp,%rcx
  mov    %r15,%rdx
  mov    0x8(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <select@plt>
  sub    $0x1,%ebx
  cmp    $0xffffffff,%ebx
  jne    L41
  mov    $0x0,%eax
L56:
  mov    0x340(%rsp,%rax,1),%edx
  mov    0x30(%rsp),%rbx
  mov    %edx,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    $0x100,%rax
  jne    L56
  mov    0xd48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  add    $0xd58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void mainloop(unsigned int work[64], const unsigned char e[32]) {
  unsigned int xzm1[64];
  unsigned int xzm[64];
  unsigned int xzmb[64];
  unsigned int xzm1b[64];
  unsigned int xznb[64];
  unsigned int xzn1b[64];
  unsigned int a0[64];
  unsigned int a1[64];
  unsigned int b0[64];
  unsigned int b1[64];
  unsigned int c1[64];
  unsigned int r[32];
  unsigned int s[32];
  unsigned int t[32];
  unsigned int u[32];
  unsigned int i;
  unsigned int j;
  unsigned int b;
  int pos;
  for (j = 0; j < 32; ++j)
    xzm1[j] = work[j];
  xzm1[32] = 1;
  for (j = 33; j < 64; ++j)
    xzm1[j] = 0;
  xzm[0] = 1;
  for (j = 1; j < 64; ++j)
    xzm[j] = 0;
  for (pos = 254; pos >= 0; --pos) {
    b = e[pos / 8] >> (pos & 7);
    b &= 1;
    select(xzmb, xzm1b, xzm, xzm1, b);
    add(a0, xzmb, xzmb + 32);
    sub(a0 + 32, xzmb, xzmb + 32);
    add(a1, xzm1b, xzm1b + 32);
    sub(a1 + 32, xzm1b, xzm1b + 32);
    square(b0, a0);
    square(b0 + 32, a0 + 32);
    mult(b1, a1, a0 + 32);
    mult(b1 + 32, a1 + 32, a0);
    add(c1, b1, b1 + 32);
    sub(c1 + 32, b1, b1 + 32);
    square(r, c1 + 32);
    sub(s, b0, b0 + 32);
    mult121665(t, s);
    add(u, t, b0);
    mult(xznb, b0, b0 + 32);
    mult(xznb + 32, s, u);
    square(xzn1b, c1);
    mult(xzn1b + 32, r, work);
    select(xzm, xzm1, xznb, xzn1b, b);
  }
  for (j = 0; j < 64; ++j)
    work[j] = xzm[j];
}
```