user: Converte this assembly snippet into its equivalent C code:

```asm
<AES>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x4c(%rbp)
  jmp    L4
L124:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x4c(%rbp)
L4:
  cmpl   $0xf,-0x4c(%rbp)
  jle    L124
  movl   $0x0,-0x4c(%rbp)
  jmp    L60
L117:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %rdx,-0x40(%rbp,%rax,8)
  addl   $0x1,-0x4c(%rbp)
L60:
  cmpl   $0x3,-0x4c(%rbp)
  jle    L117
  lea    -0x40(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  movl   $0x1,-0x48(%rbp)
  jmp    L79
L3:
  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>
  movl   $0x0,-0x44(%rbp)
  jmp    L21
L61:
  mov    -0x48(%rbp),%eax
  lea    0x0(,%rax,4),%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %rdx,-0x40(%rbp,%rax,8)
  addl   $0x1,-0x44(%rbp)
L21:
  cmpl   $0x3,-0x44(%rbp)
  jle    L61
  lea    -0x40(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  addl   $0x1,-0x48(%rbp)
L79:
  cmpl   $0x9,-0x48(%rbp)
  jle    L3
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <SubBytes@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <ShiftRows@plt>
  movl   $0x0,-0x44(%rbp)
  jmp    L32
L43:
  mov    -0x44(%rbp),%eax
  add    $0x28,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %rdx,-0x40(%rbp,%rax,8)
  addl   $0x1,-0x44(%rbp)
L32:
  cmpl   $0x3,-0x44(%rbp)
  jle    L43
  lea    -0x40(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <AddRoundKey@plt>
  movl   $0x0,-0x4c(%rbp)
  jmp    L63
L5:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4c(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x4c(%rbp)
L63:
  cmpl   $0xf,-0x4c(%rbp)
  jle    L5
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

assistant: ```c
void AES(unsigned char in[16], unsigned char out[16], unsigned long w[44]) {
  unsigned char state[16];
  unsigned long temp[4];
  int i, j, k;
  for (i = 0; i < 16; i++) {
    state[i] = in[i];
  }
  for (i = 0; i < 4; i++) {
    temp[i] = w[i];
  }
  AddRoundKey(state, temp);
  for (j = 1; j < 10; j++) {
    SubBytes(state);
    ShiftRows(state);
    MixColumns(state);
    for (k = 0; k < 4; k++) {
      temp[k] = w[j * 4 + k];
    }
    AddRoundKey(state, temp);
  }
  SubBytes(state);
  ShiftRows(state);
  for (k = 0; k < 4; k++) {
    temp[k] = w[40 + k];
  }
  AddRoundKey(state, temp);
  for (i = 0; i < 16; i++) {
    out[i] = state[i];
  }
}
```