user: Translate the below assembly code into C programming language:

```asm
<convert>:
  endbr64
  push   %r12
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x30,%rsp
  mov    $0x1,%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x2028(%rsp)
  xor    %eax,%eax
  mov    %rdi,%rcx
  mov    %rsi,%r12
  lea    0x20(%rsp),%rdi
  mov    $0x1000,%esi
  call   <fread@plt>
  lea    0x1020(%rsp),%rdi
  lea    0x720(%rsp),%rax
  mov    %rdi,%rdx
  lea    0x820(%rsp),%rcx
L19:
  movdqa -0x700(%rax),%xmm0
  movdqa (%rax),%xmm4
  add    $0x10,%rax
  add    $0x100,%rdx
  movdqa -0x310(%rax),%xmm6
  movdqa -0x610(%rax),%xmm1
  movdqa %xmm0,%xmm2
  movdqa %xmm4,%xmm10
  punpcklbw 0xf0(%rax),%xmm2
  movdqa -0x210(%rax),%xmm9
  punpckhbw 0x7f0(%rax),%xmm4
  movdqa %xmm6,%xmm15
  punpckhbw 0xf0(%rax),%xmm0
  punpcklbw 0x4f0(%rax),%xmm15
  punpckhbw 0x4f0(%rax),%xmm6
  movdqa %xmm1,%xmm3
  movdqa -0x510(%rax),%xmm11
  movaps %xmm4,0x10(%rsp)
  punpcklbw 0x1f0(%rax),%xmm3
  movdqa %xmm2,%xmm4
  punpcklbw %xmm15,%xmm4
  punpckhbw %xmm15,%xmm2
  movdqa %xmm9,%xmm5
  movdqa -0x110(%rax),%xmm13
  punpcklbw 0x5f0(%rax),%xmm5
  movdqa %xmm0,%xmm15
  punpckhbw 0x1f0(%rax),%xmm1
  punpcklbw %xmm6,%xmm15
  punpckhbw %xmm6,%xmm0
  movdqa %xmm11,%xmm7
  movdqa -0x410(%rax),%xmm8
  punpckhbw 0x5f0(%rax),%xmm9
  movdqa %xmm3,%xmm6
  punpcklbw 0x2f0(%rax),%xmm7
  punpcklbw %xmm5,%xmm6
  punpckhbw %xmm5,%xmm3
  movdqa %xmm13,%xmm14
  punpckhbw 0x2f0(%rax),%xmm11
  movdqa %xmm1,%xmm5
  movdqa %xmm8,%xmm12
  punpcklbw 0x6f0(%rax),%xmm14
  punpcklbw %xmm9,%xmm5
  punpckhbw %xmm9,%xmm1
  punpckhbw 0x6f0(%rax),%xmm13
  movdqa %xmm7,%xmm9
  punpcklbw 0x3f0(%rax),%xmm12
  movaps %xmm1,(%rsp)
  punpcklbw 0x7f0(%rax),%xmm10
  punpcklbw %xmm14,%xmm9
  punpckhbw %xmm14,%xmm7
  punpckhbw 0x3f0(%rax),%xmm8
  movdqa %xmm11,%xmm14
  punpckhbw %xmm13,%xmm11
  punpcklbw %xmm13,%xmm14
  movdqa %xmm12,%xmm13
  punpckhbw %xmm10,%xmm12
  punpcklbw %xmm10,%xmm13
  movdqa 0x10(%rsp),%xmm10
  movdqa %xmm8,%xmm1
  punpcklbw %xmm10,%xmm1
  punpckhbw %xmm10,%xmm8
  movdqa %xmm4,%xmm10
  punpcklbw %xmm9,%xmm10
  punpckhbw %xmm9,%xmm4
  movdqa %xmm2,%xmm9
  punpcklbw %xmm7,%xmm9
  punpckhbw %xmm7,%xmm2
  movdqa %xmm15,%xmm7
  punpcklbw %xmm14,%xmm7
  punpckhbw %xmm14,%xmm15
  movdqa %xmm6,%xmm14
  movaps %xmm7,0x10(%rsp)
  movdqa %xmm0,%xmm7
  punpcklbw %xmm13,%xmm14
  punpckhbw %xmm11,%xmm0
  punpcklbw %xmm11,%xmm7
  punpckhbw %xmm13,%xmm6
  movdqa (%rsp),%xmm11
  movdqa %xmm3,%xmm13
  punpcklbw %xmm12,%xmm13
  punpckhbw %xmm12,%xmm3
  movdqa %xmm5,%xmm12
  punpcklbw %xmm1,%xmm12
  punpckhbw %xmm1,%xmm5
  punpcklbw %xmm8,%xmm11
  movdqa %xmm8,%xmm1
  movdqa (%rsp),%xmm8
  punpckhbw %xmm1,%xmm8
  movdqa %xmm8,%xmm1
  movdqa %xmm10,%xmm8
  punpckhbw %xmm14,%xmm10
  movaps %xmm10,-0xf0(%rdx)
  movdqa %xmm4,%xmm10
  punpcklbw %xmm14,%xmm8
  punpckhbw %xmm6,%xmm4
  punpcklbw %xmm6,%xmm10
  movaps %xmm8,-0x100(%rdx)
  movaps %xmm10,-0xe0(%rdx)
  movaps %xmm4,-0xd0(%rdx)
  movdqa %xmm9,%xmm4
  punpckhbw %xmm13,%xmm9
  punpcklbw %xmm13,%xmm4
  movaps %xmm9,-0xb0(%rdx)
  movaps %xmm4,-0xc0(%rdx)
  movdqa %xmm2,%xmm4
  punpckhbw %xmm3,%xmm2
  punpcklbw %xmm3,%xmm4
  movdqa 0x10(%rsp),%xmm3
  movaps %xmm2,-0x90(%rdx)
  movaps %xmm4,-0xa0(%rdx)
  movdqa %xmm3,%xmm2
  punpckhbw %xmm12,%xmm3
  punpcklbw %xmm12,%xmm2
  movaps %xmm3,-0x70(%rdx)
  movaps %xmm2,-0x80(%rdx)
  movdqa %xmm15,%xmm2
  punpcklbw %xmm5,%xmm2
  movaps %xmm2,-0x60(%rdx)
  movdqa %xmm15,%xmm2
  punpckhbw %xmm5,%xmm2
  movaps %xmm2,-0x50(%rdx)
  movdqa %xmm7,%xmm2
  punpckhbw %xmm11,%xmm7
  punpcklbw %xmm11,%xmm2
  movaps %xmm7,-0x30(%rdx)
  movaps %xmm2,-0x40(%rdx)
  movdqa %xmm0,%xmm2
  punpckhbw %xmm1,%xmm0
  punpcklbw %xmm1,%xmm2
  movaps %xmm0,-0x10(%rdx)
  movaps %xmm2,-0x20(%rdx)
  cmp    %rax,%rcx
  jne    L19
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1000,%esi
  call   <fwrite@plt>
  mov    0x2028(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x2030,%rsp
  pop    %r12
  ret
L3:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void convert(FILE *fi, FILE *fo) {
  char inbuf[0x1000];
  char outbuf[0x1000];
  fread(inbuf, 0x1000, 1, fi);
  for (int c = 0; c < 256; ++c) {
    for (int l = 0; l < 16; ++l) {
      outbuf[c * 16 + l] = inbuf[c + 256 * l];
    }
  }
  fwrite(outbuf, 0x1000, 1, fo);
}
```