user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x828,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1818(%rsp)
  xor    %eax,%eax
L197:
  mov    %ax,0x1010(%rsp,%rax,2)
  add    $0x1,%rax
  cmp    $0x400,%rax
  jne    L197
  lea    0x1010(%rsp),%rbx
  lea    0x10(%rsp),%r13
  lea    0x810(%rsp),%r14
  lea    0x1410(%rsp),%r12
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rax
L108:
  movzwl 0x4(%rax),%edi
  movzwl 0x6(%rax),%esi
  movzwl (%rax),%r11d
  lea    0x0(,%r11,8),%r9d
  movzwl 0x2(%rax),%r11d
  lea    0x7(%r11),%r8d
  mov    %r9w,(%rdx)
  mov    %r8w,0x2(%rdx)
  lea    0x6(%rdi),%r10d
  mov    %r10w,0x4(%rdx)
  lea    (%rsi,%rsi,4),%r10d
  mov    %r10w,0x6(%rdx)
  mov    %r9w,(%rcx)
  mov    %r8w,0x2(%rcx)
  add    $0x4,%edi
  mov    %di,0x4(%rcx)
  add    $0x3,%esi
  mov    %si,0x6(%rcx)
  add    $0x8,%rax
  add    $0x8,%rdx
  add    $0x8,%rcx
  cmp    %r12,%rax
  jne    L108
  mov    %r14,%r15
  mov    %r13,(%rsp)
  mov    %rbx,%rbp
  jmp    L74
L174:
  mov    $0x0,%eax
  call   <abort@plt>
L367:
  movzwl 0x8(%rsp),%eax
  cmp    %ax,(%r15)
  jne    L350
  movzwl 0xa(%rsp),%eax
  cmp    %ax,0x2(%r15)
  je     L186
L350:
  mov    $0x0,%eax
  call   <abort@plt>
L97:
  add    $0x8,%rbp
  addq   $0x8,(%rsp)
  add    $0x8,%r15
  cmp    %r12,%rbp
  je     L339
L74:
  movzwl 0x4(%rbp),%eax
  mov    %ax,0xc(%rsp)
  movzwl 0x6(%rbp),%eax
  mov    %ax,0xe(%rsp)
  movzwl 0x0(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  mov    %cx,0x8(%rsp)
  movzwl 0x2(%rbp),%eax
  lea    0x7(%rax),%edi
  mov    %di,0xa(%rsp)
  mov    (%rsp),%rsi
  mov    %rsi,%rax
  cmp    %cx,(%rsi)
  jne    L174
  cmp    %di,0x2(%rsi)
  jne    L174
  movzwl 0xc(%rsp),%esi
  lea    0x6(%rsi),%edx
  cmp    %dx,0x4(%rax)
  jne    L174
  movzwl 0xe(%rsp),%esi
  lea    (%rsi,%rsi,4),%edx
  cmp    %dx,0x6(%rax)
  jne    L174
  jmp    L367
L186:
  movzwl 0xc(%rsp),%eax
  add    $0x4,%eax
  cmp    %ax,0x4(%r15)
  jne    L350
  movzwl 0xe(%rsp),%eax
  add    $0x3,%eax
  cmp    %ax,0x6(%r15)
  jne    L350
  jmp    L97
L339:
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rax
L115:
  movzwl 0x4(%rax),%edi
  movzwl 0x6(%rax),%esi
  movzwl (%rax),%r11d
  lea    0x8(%r11),%r9d
  movzwl 0x2(%rax),%r11d
  lea    0x7(%r11),%r8d
  mov    %r9w,(%rdx)
  mov    %r8w,0x2(%rdx)
  lea    0x6(%rdi),%r10d
  mov    %r10w,0x4(%rdx)
  lea    (%rsi,%rsi,4),%r10d
  mov    %r10w,0x6(%rdx)
  mov    %r9w,(%rcx)
  mov    %r8w,0x2(%rcx)
  add    $0x4,%edi
  mov    %di,0x4(%rcx)
  add    $0x3,%esi
  mov    %si,0x6(%rcx)
  add    $0x8,%rax
  add    $0x8,%rdx
  add    $0x8,%rcx
  cmp    %r12,%rax
  jne    L115
  mov    %r14,%r15
  mov    %r13,(%rsp)
  mov    %rbx,%rbp
  jmp    L202
L386:
  movzwl 0xc(%rsp),%esi
  lea    0x6(%rsi),%edx
  cmp    %dx,0x4(%rdi)
  jne    L379
  movzwl 0xe(%rsp),%esi
  lea    (%rsi,%rsi,4),%edx
  cmp    %dx,0x6(%rdi)
  jne    L379
  jmp    L46
L198:
  mov    $0x0,%eax
  call   <abort@plt>
L264:
  add    $0x8,%rbp
  addq   $0x8,(%rsp)
  add    $0x8,%r15
  cmp    %r12,%rbp
  je     L397
L202:
  movzwl 0x4(%rbp),%eax
  mov    %ax,0xc(%rsp)
  movzwl 0x6(%rbp),%eax
  mov    %ax,0xe(%rsp)
  movzwl 0x0(%rbp),%eax
  lea    0x8(%rax),%edx
  mov    %dx,0x8(%rsp)
  movzwl 0x2(%rbp),%eax
  lea    0x7(%rax),%ecx
  mov    %cx,0xa(%rsp)
  mov    (%rsp),%rdi
  cmp    %dx,(%rdi)
  jne    L379
  cmp    %cx,0x2(%rdi)
  je     L386
L379:
  mov    $0x0,%eax
  call   <abort@plt>
L46:
  movzwl 0x8(%rsp),%eax
  cmp    %ax,(%r15)
  jne    L198
  movzwl 0xa(%rsp),%eax
  cmp    %ax,0x2(%r15)
  jne    L198
  movzwl 0xc(%rsp),%eax
  add    $0x4,%eax
  cmp    %ax,0x4(%r15)
  jne    L198
  movzwl 0xe(%rsp),%eax
  add    $0x3,%eax
  cmp    %ax,0x6(%r15)
  jne    L198
  jmp    L264
L397:
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rax
L53:
  movzwl 0x4(%rax),%edi
  movzwl 0x6(%rax),%esi
  movzwl (%rax),%r11d
  lea    0x8(%r11),%r9d
  movzwl 0x2(%rax),%r8d
  add    $0x7,%r8d
  mov    %r9w,(%rdx)
  mov    %r8w,0x2(%rdx)
  lea    0x6(%rdi),%r10d
  mov    %r10w,0x4(%rdx)
  lea    0x5(%rsi),%r10d
  mov    %r10w,0x6(%rdx)
  mov    %r9w,(%rcx)
  mov    %r8w,0x2(%rcx)
  shl    $0x2,%edi
  mov    %di,0x4(%rcx)
  add    $0x3,%esi
  mov    %si,0x6(%rcx)
  add    $0x8,%rax
  add    $0x8,%rdx
  add    $0x8,%rcx
  cmp    %r12,%rax
  jne    L53
  jmp    L331
L205:
  mov    $0x0,%eax
  call   <abort@plt>
L368:
  cmp    %bp,(%r14)
  jne    L375
  cmp    %r15w,0x2(%r14)
  je     L280
L375:
  mov    $0x0,%eax
  call   <abort@plt>
L254:
  add    $0x8,%rbx
  add    $0x8,%r13
  add    $0x8,%r14
  cmp    %r12,%rbx
  je     L119
L331:
  movzwl 0x4(%rbx),%eax
  mov    %ax,(%rsp)
  movzwl 0x6(%rbx),%eax
  mov    %ax,0x8(%rsp)
  movzwl (%rbx),%eax
  lea    0x8(%rax),%ebp
  movzwl 0x2(%rbx),%eax
  lea    0x7(%rax),%r15d
  cmp    %bp,0x0(%r13)
  jne    L205
  cmp    %r15w,0x2(%r13)
  jne    L205
  movzwl (%rsp),%esi
  lea    0x6(%rsi),%edx
  cmp    %dx,0x4(%r13)
  jne    L205
  movzwl 0x8(%rsp),%esi
  lea    0x5(%rsi),%edx
  cmp    %dx,0x6(%r13)
  jne    L205
  jmp    L368
L280:
  movzwl (%rsp),%eax
  shl    $0x2,%eax
  cmp    %ax,0x4(%r14)
  jne    L375
  movzwl 0x8(%rsp),%eax
  add    $0x3,%eax
  cmp    %ax,0x6(%r14)
  jne    L375
  jmp    L254
L119:
  mov    0x1818(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L250
  mov    $0x0,%eax
  add    $0x1828,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L250:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int main1() {
  unsigned short i;
  unsigned short out[128 * 8], out2[128 * 8], b0, b1, b2, b3, b4, a0, a1, a2, a3, b5;
  unsigned short in[128 * 8];
  for (i = 0; i < 128 * 8; i++) {
    in[i] = i;
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 * 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 * 5;
    b4 = a2 + 4;
    b5 = a3 + 3;
    out[i * 4] = b0;
    out[i * 4 + 1] = b1;
    out[i * 4 + 2] = b2;
    out[i * 4 + 3] = b3;
    out2[i * 4] = b0;
    out2[i * 4 + 1] = b1;
    out2[i * 4 + 2] = b4;
    out2[i * 4 + 3] = b5;
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 * 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 * 5;
    b4 = a2 + 4;
    b5 = a3 + 3;
    if (out[i * 4] != b0 || out[i * 4 + 1] != b1 || out[i * 4 + 2] != b2 || out[i * 4 + 3] != b3)
      abort();
    if (out2[i * 4] != b0 || out2[i * 4 + 1] != b1 || out2[i * 4 + 2] != b4 || out2[i * 4 + 3] != b5)
      abort();
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 + 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 * 5;
    b4 = a2 + 4;
    b5 = a3 + 3;
    out[i * 4] = b0;
    out[i * 4 + 1] = b1;
    out[i * 4 + 2] = b2;
    out[i * 4 + 3] = b3;
    out2[i * 4] = b0;
    out2[i * 4 + 1] = b1;
    out2[i * 4 + 2] = b4;
    out2[i * 4 + 3] = b5;
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 + 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 * 5;
    b4 = a2 + 4;
    b5 = a3 + 3;
    if (out[i * 4] != b0 || out[i * 4 + 1] != b1 || out[i * 4 + 2] != b2 || out[i * 4 + 3] != b3)
      abort();
    if (out2[i * 4] != b0 || out2[i * 4 + 1] != b1 || out2[i * 4 + 2] != b4 || out2[i * 4 + 3] != b5)
      abort();
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 + 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 + 5;
    b4 = a2 * 4;
    b5 = a3 + 3;
    out[i * 4] = b0;
    out[i * 4 + 1] = b1;
    out[i * 4 + 2] = b2;
    out[i * 4 + 3] = b3;
    out2[i * 4] = b0;
    out2[i * 4 + 1] = b1;
    out2[i * 4 + 2] = b4;
    out2[i * 4 + 3] = b5;
  }
  for (i = 0; i < 128; i++) {
    a0 = in[i * 4];
    a1 = in[i * 4 + 1];
    a2 = in[i * 4 + 2];
    a3 = in[i * 4 + 3];
    b0 = a0 + 8;
    b1 = a1 + 7;
    b2 = a2 + 6;
    b3 = a3 + 5;
    b4 = a2 * 4;
    b5 = a3 + 3;
    if (out[i * 4] != b0 || out[i * 4 + 1] != b1 || out[i * 4 + 2] != b2 || out[i * 4 + 3] != b3)
      abort();
    if (out2[i * 4] != b0 || out2[i * 4 + 1] != b1 || out2[i * 4 + 2] != b4 || out2[i * 4 + 3] != b5)
      abort();
  }
  return 0;
}
```