user: Demonstrate the C code that generates the assembly output below:

```asm
<aes_encrypt>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,%rbp
  mov    %rdx,%r12
  mov    %ecx,%r13d
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  xor    %edx,%edx
  movzbl (%rdi),%edx
  mov    %dl,(%rsp)
  movzbl 0x1(%rdi),%edx
  mov    %dl,0x4(%rsp)
  movzbl 0x2(%rdi),%edx
  mov    %dl,0x8(%rsp)
  movzbl 0x3(%rdi),%edx
  mov    %dl,0xc(%rsp)
  movzbl 0x4(%rdi),%edx
  mov    %dl,0x1(%rsp)
  movzbl 0x5(%rdi),%edx
  mov    %dl,0x5(%rsp)
  movzbl 0x6(%rdi),%edx
  mov    %dl,0x9(%rsp)
  movzbl 0x7(%rdi),%edx
  mov    %dl,0xd(%rsp)
  movzbl 0x8(%rdi),%edx
  mov    %dl,0x2(%rsp)
  movzbl 0x9(%rdi),%edx
  mov    %dl,0x6(%rsp)
  movzbl 0xa(%rdi),%edx
  mov    %dl,0xa(%rsp)
  movzbl 0xb(%rdi),%edx
  mov    %dl,0xe(%rsp)
  movzbl 0xc(%rdi),%edx
  mov    %dl,0x3(%rsp)
  movzbl 0xd(%rdi),%edx
  mov    %dl,0x7(%rsp)
  movzbl 0xe(%rdi),%edx
  mov    %dl,0xb(%rsp)
  movzbl 0xf(%rdi),%eax
  mov    %al,0xf(%rsp)
  mov    %rsp,%rbx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x20(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x40(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x60(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x80(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0xa0(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0xc0(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0xe0(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x100(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x120(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  cmp    $0x80,%r13d
  je     L13
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x140(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x160(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  cmp    $0xc0,%r13d
  je     L2
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x180(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  mov    %rbx,%rdi
  call   <MixColumns@plt>
  lea    0x1a0(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  lea    0x1c0(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
L21:
  movzbl (%rsp),%eax
  mov    %al,0x0(%rbp)
  movzbl 0x4(%rsp),%eax
  mov    %al,0x1(%rbp)
  movzbl 0x8(%rsp),%eax
  mov    %al,0x2(%rbp)
  movzbl 0xc(%rsp),%eax
  mov    %al,0x3(%rbp)
  movzbl 0x1(%rsp),%eax
  mov    %al,0x4(%rbp)
  movzbl 0x5(%rsp),%eax
  mov    %al,0x5(%rbp)
  movzbl 0x9(%rsp),%eax
  mov    %al,0x6(%rbp)
  movzbl 0xd(%rsp),%eax
  mov    %al,0x7(%rbp)
  movzbl 0x2(%rsp),%eax
  mov    %al,0x8(%rbp)
  movzbl 0x6(%rsp),%eax
  mov    %al,0x9(%rbp)
  movzbl 0xa(%rsp),%eax
  mov    %al,0xa(%rbp)
  movzbl 0xe(%rsp),%eax
  mov    %al,0xb(%rbp)
  movzbl 0x3(%rsp),%eax
  mov    %al,0xc(%rbp)
  movzbl 0x7(%rsp),%eax
  mov    %al,0xd(%rbp)
  movzbl 0xb(%rsp),%eax
  mov    %al,0xe(%rbp)
  movzbl 0xf(%rsp),%eax
  mov    %al,0xf(%rbp)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  lea    0x180(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  jmp    L21
L13:
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <SubBytes@plt>
  mov    %rbx,%rdi
  call   <ShiftRows@plt>
  lea    0x140(%r12),%rsi
  mov    %rbx,%rdi
  call   <AddRoundKey@plt>
  jmp    L21
L8:
  call   <__stack_chk_fail@plt>
```

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];
}
```