user: 请将以下的汇编代码转换成C语言代码：

```asm
<aes_encrypt>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rdi,%rax
  mov    %rsi,%r12
  mov    %rdx,%rdi
  mov    %fs:0x28,%rdx
  mov    %rdx,0xc8(%rsp)
  xor    %edx,%edx
  movzbl (%rax),%edx
  mov    %dl,(%rsp)
  movzbl 0x1(%rax),%edx
  mov    %dl,0x4(%rsp)
  movzbl 0x2(%rax),%edx
  mov    %dl,0x8(%rsp)
  movzbl 0x3(%rax),%edx
  mov    %dl,0xc(%rsp)
  movzbl 0x4(%rax),%edx
  mov    %dl,0x1(%rsp)
  movzbl 0x5(%rax),%edx
  mov    %dl,0x5(%rsp)
  movzbl 0x6(%rax),%edx
  mov    %dl,0x9(%rsp)
  movzbl 0x7(%rax),%edx
  mov    %dl,0xd(%rsp)
  movzbl 0x8(%rax),%edx
  mov    %dl,0x2(%rsp)
  movzbl 0x9(%rax),%edx
  mov    %dl,0x6(%rsp)
  movzbl 0xa(%rax),%edx
  mov    %dl,0xa(%rsp)
  movzbl 0xb(%rax),%edx
  mov    %dl,0xe(%rsp)
  movzbl 0xc(%rax),%edx
  mov    %dl,0x3(%rsp)
  movzbl 0xd(%rax),%edx
  mov    %dl,0x7(%rsp)
  movzbl 0xe(%rax),%edx
  mov    %dl,0xb(%rsp)
  movzbl 0xf(%rax),%eax
  mov    %al,0xf(%rsp)
  lea    0x10(%rsp),%rbx
  mov    $0x80,%edx
  mov    %rbx,%rsi
  call   <KeyExpansion@plt>
  mov    %rsp,%rdi
  mov    %rbx,%rsi
  call   <AddRoundKey@plt>
  lea    0x20(%rsp),%rbp
  lea    0xb0(%rsp),%r13
  mov    %rsp,%rbx
L17:
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  add    $0x10,%rbp
  cmp    %r13,%rbp
  jne    L17
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  lea    0xb0(%rsp),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  movzbl (%rsp),%eax
  mov    %al,(%r12)
  movzbl 0x4(%rsp),%eax
  mov    %al,0x1(%r12)
  movzbl 0x8(%rsp),%eax
  mov    %al,0x2(%r12)
  movzbl 0xc(%rsp),%eax
  mov    %al,0x3(%r12)
  movzbl 0x1(%rsp),%eax
  mov    %al,0x4(%r12)
  movzbl 0x5(%rsp),%eax
  mov    %al,0x5(%r12)
  movzbl 0x9(%rsp),%eax
  mov    %al,0x6(%r12)
  movzbl 0xd(%rsp),%eax
  mov    %al,0x7(%r12)
  movzbl 0x2(%rsp),%eax
  mov    %al,0x8(%r12)
  movzbl 0x6(%rsp),%eax
  mov    %al,0x9(%r12)
  movzbl 0xa(%rsp),%eax
  mov    %al,0xa(%r12)
  movzbl 0xe(%rsp),%eax
  mov    %al,0xb(%r12)
  movzbl 0x3(%rsp),%eax
  mov    %al,0xc(%r12)
  movzbl 0x7(%rsp),%eax
  mov    %al,0xd(%r12)
  movzbl 0xb(%rsp),%eax
  mov    %al,0xe(%r12)
  movzbl 0xf(%rsp),%eax
  mov    %al,0xf(%r12)
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void aes_encrypt(unsigned char in[], unsigned char out[], unsigned char key[], int keysize) {
  unsigned char state[4][4];
  short i = 0;
  unsigned int w[44];
  state[0][0] = in[0];
  state[1][0] = in[1];
  state[2][0] = in[2];
  state[3][0] = in[3];
  state[0][1] = in[4];
  state[1][1] = in[5];
  state[2][1] = in[6];
  state[3][1] = in[7];
  state[0][2] = in[8];
  state[1][2] = in[9];
  state[2][2] = in[10];
  state[3][2] = in[11];
  state[0][3] = in[12];
  state[1][3] = in[13];
  state[2][3] = in[14];
  state[3][3] = in[15];
  KeyExpansion(key, w, 128);
  AddRoundKey(state, (unsigned char *)&w[0]);
  for (i = 1; i < 10; i++) {
    SubBytes(state);
    ShiftRows(state);
    MixColumns(state);
    AddRoundKey(state, (unsigned char *)&w[4 * i]);
  }
  SubBytes(state);
  ShiftRows(state);
  AddRoundKey(state, (unsigned char *)&w[4 * i]);
  out[0] = state[0][0];
  out[1] = state[1][0];
  out[2] = state[2][0];
  out[3] = state[3][0];
  out[4] = state[0][1];
  out[5] = state[1][1];
  out[6] = state[2][1];
  out[7] = state[3][1];
  out[8] = state[0][2];
  out[9] = state[1][2];
  out[10] = state[2][2];
  out[11] = state[3][2];
  out[12] = state[0][3];
  out[13] = state[1][3];
  out[14] = state[2][3];
  out[15] = state[3][3];
}
```