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

```asm
<aes_encrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x1(%rax),%eax
  mov    %al,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x2(%rax),%eax
  mov    %al,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x3(%rax),%eax
  mov    %al,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x4(%rax),%eax
  mov    %al,-0x1f(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x5(%rax),%eax
  mov    %al,-0x1b(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x6(%rax),%eax
  mov    %al,-0x17(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x7(%rax),%eax
  mov    %al,-0x13(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x8(%rax),%eax
  mov    %al,-0x1e(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0x9(%rax),%eax
  mov    %al,-0x1a(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xa(%rax),%eax
  mov    %al,-0x16(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xb(%rax),%eax
  mov    %al,-0x12(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xc(%rax),%eax
  mov    %al,-0x1d(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xd(%rax),%eax
  mov    %al,-0x19(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xe(%rax),%eax
  mov    %al,-0x15(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl 0xf(%rax),%eax
  mov    %al,-0x11(%rbp)
  mov    -0x38(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x20(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x40(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x60(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x80(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0xa0(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0xc0(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0xe0(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x100(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x120(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  cmpl   $0x80,-0x3c(%rbp)
  je     L5
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x140(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x160(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  cmpl   $0xc0,-0x3c(%rbp)
  je     L41
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x180(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <MixColumns@plt>
  mov    -0x38(%rbp),%rax
  lea    0x1a0(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  mov    -0x38(%rbp),%rax
  lea    0x1c0(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  jmp    L37
L41:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  mov    -0x38(%rbp),%rax
  lea    0x180(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  jmp    L37
L5:
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  mov    -0x38(%rbp),%rax
  lea    0x140(%rax),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
L37:
  movzbl -0x20(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  movzbl -0x1c(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x2(%rax),%rdx
  movzbl -0x18(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x3(%rax),%rdx
  movzbl -0x14(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x4(%rax),%rdx
  movzbl -0x1f(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x5(%rax),%rdx
  movzbl -0x1b(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x6(%rax),%rdx
  movzbl -0x17(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x7(%rax),%rdx
  movzbl -0x13(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  movzbl -0x1e(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x9(%rax),%rdx
  movzbl -0x1a(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xa(%rax),%rdx
  movzbl -0x16(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xb(%rax),%rdx
  movzbl -0x12(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xc(%rax),%rdx
  movzbl -0x1d(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xd(%rax),%rdx
  movzbl -0x19(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xe(%rax),%rdx
  movzbl -0x15(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0xf(%rax),%rdx
  movzbl -0x11(%rbp),%eax
  mov    %al,(%rdx)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L0
  call   <__stack_chk_fail@plt>
L0:
  leave
  ret
```

assistant: ```c
void aes_encrypt(unsigned char in[], unsigned char out[], unsigned long key[], int keysize) {
  unsigned char state[4][4];
  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];
  AddRoundKey(state, &key[0]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[4]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[8]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[12]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[16]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[20]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[24]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[28]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[32]);
  SubBytes(state);
  ShiftRows(state);
  MixColumns(state);
  AddRoundKey(state, &key[36]);
  if (keysize != 128) {
    SubBytes(state);
    ShiftRows(state);
    MixColumns(state);
    AddRoundKey(state, &key[40]);
    SubBytes(state);
    ShiftRows(state);
    MixColumns(state);
    AddRoundKey(state, &key[44]);
    if (keysize != 192) {
      SubBytes(state);
      ShiftRows(state);
      MixColumns(state);
      AddRoundKey(state, &key[48]);
      SubBytes(state);
      ShiftRows(state);
      MixColumns(state);
      AddRoundKey(state, &key[52]);
      SubBytes(state);
      ShiftRows(state);
      AddRoundKey(state, &key[56]);
    } else {
      SubBytes(state);
      ShiftRows(state);
      AddRoundKey(state, &key[48]);
    }
  } else {
    SubBytes(state);
    ShiftRows(state);
    AddRoundKey(state, &key[40]);
  }
  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];
}
```