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

```asm
<aesEncrypt>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  mov    $0x10,%edx
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x1c8,%rsp
  mov    %esi,0xc(%rsp)
  lea    0x180(%rsp),%r12
  mov    %r8,%rsi
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1b8(%rsp)
  xor    %eax,%eax
  call   <memcpy@plt>
  lea    0x20(%rsp),%r11
  mov    $0x80,%edx
  mov    %r12,%rsi
  mov    %r11,%rdi
  mov    %r11,(%rsp)
  call   <aesSetupEncrypt@plt>
  test   %ebx,%ebx
  mov    (%rsp),%r11
  je     L293
  mov    %eax,%r10d
  lea    0x10(%r15),%rax
  mov    0xc(%rsp),%r12d
  lea    0x190(%rsp),%r15
  mov    %rax,(%rsp)
  lea    0x1a0(%rsp),%r13
L338:
  mov    (%rsp),%rax
  lea    -0x10(%rax),%r14
  movzbl 0x0(%rbp),%eax
  mov    %al,0x190(%rsp)
  cmp    $0x1,%ebx
  je     L369
  movzbl 0x1(%rbp),%eax
  mov    %al,0x191(%rsp)
  cmp    $0x2,%ebx
  je     L349
  movzbl 0x2(%rbp),%eax
  mov    %al,0x192(%rsp)
  cmp    $0x3,%ebx
  je     L325
  movzbl 0x3(%rbp),%eax
  mov    %al,0x193(%rsp)
  cmp    $0x4,%ebx
  je     L62
  movzbl 0x4(%rbp),%eax
  mov    %al,0x194(%rsp)
  cmp    $0x5,%ebx
  je     L161
  movzbl 0x5(%rbp),%eax
  mov    %al,0x195(%rsp)
  cmp    $0x6,%ebx
  je     L12
  movzbl 0x6(%rbp),%eax
  mov    %al,0x196(%rsp)
  cmp    $0x7,%ebx
  je     L275
  movzbl 0x7(%rbp),%eax
  mov    %al,0x197(%rsp)
  cmp    $0x8,%ebx
  je     L343
  movzbl 0x8(%rbp),%eax
  mov    %al,0x198(%rsp)
  cmp    $0x9,%ebx
  je     L250
  movzbl 0x9(%rbp),%eax
  mov    %al,0x199(%rsp)
  cmp    $0xa,%ebx
  je     L301
  movzbl 0xa(%rbp),%eax
  mov    %al,0x19a(%rsp)
  cmp    $0xb,%ebx
  je     L361
  movzbl 0xb(%rbp),%eax
  mov    %al,0x19b(%rsp)
  cmp    $0xc,%ebx
  je     L331
  movzbl 0xc(%rbp),%eax
  mov    %al,0x19c(%rsp)
  cmp    $0xd,%ebx
  je     L38
  movzbl 0xd(%rbp),%eax
  mov    %al,0x19d(%rsp)
  cmp    $0xe,%ebx
  je     L368
  movzbl 0xe(%rbp),%eax
  mov    %al,0x19e(%rsp)
  cmp    $0xf,%ebx
  je     L278
  movzbl 0xf(%rbp),%eax
  mov    %r10d,%esi
  mov    %r11,%rdi
  mov    %r13,%rcx
  mov    %r15,%rdx
  mov    %r10d,0x18(%rsp)
  mov    %r11,0x10(%rsp)
  mov    %al,0x19f(%rsp)
  call   <aesDoEncrypt@plt>
  cmp    $0xf,%r12d
  mov    0x10(%rsp),%r11
  mov    0x18(%rsp),%r10d
  jle    L384
  mov    %r14,%rdi
  sub    $0x10,%ebx
  mov    $0x10,%edx
  mov    %r13,%rsi
  mov    %r11,0x18(%rsp)
  lea    -0x10(%r12),%r14d
  mov    %r10d,0x10(%rsp)
  call   <memcpy@plt>
  test   %ebx,%ebx
  mov    0x10(%rsp),%r10d
  mov    0x18(%rsp),%r11
  jne    L373
  mov    $0x10,%edx
  mov    $0x10,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    0x10(%rsp),%esi
  mov    %r13,%rcx
  mov    %r15,%rdx
  mov    0x18(%rsp),%rdi
  call   <aesDoEncrypt@plt>
  cmp    $0xf,%r14d
  jle    L384
  mov    (%rsp),%rdi
  mov    $0x10,%edx
  mov    %r13,%rsi
  sub    $0x20,%r12d
  call   <memcpy@plt>
  mov    0xc(%rsp),%r14d
  sub    %r12d,%r14d
L293:
  mov    0x1b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  add    $0x1c8,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L373:
  addq   $0x10,(%rsp)
  add    $0x10,%rbp
  mov    %r14d,%r12d
  jmp    L338
  nopl   0x0(%rax,%rax,1)
L384:
  mov    $0xffffffff,%r14d
  jmp    L293
L369:
  mov    $0x1,%edx
  mov    $0xf,%ecx
  nopw   0x0(%rax,%rax,1)
L327:
  movabs $0x101010101010101,%rsi
  mov    $0x10,%eax
  sub    %edx,%eax
  imul   %rsi,%rcx
  add    %r15,%rdx
  cmp    $0x8,%eax
  jae    L93
  test   $0x4,%al
  jne    L138
  test   %eax,%eax
  je     L53
  mov    %cl,(%rdx)
  test   $0x2,%al
  jne    L113
L53:
  mov    %r13,%rcx
  mov    %r15,%rdx
  mov    %r10d,%esi
  mov    %r11,%rdi
  call   <aesDoEncrypt@plt>
  cmp    $0xf,%r12d
  jle    L384
  mov    %r14,%rdi
  mov    $0x10,%edx
  mov    %r13,%rsi
  sub    $0x10,%r12d
  call   <memcpy@plt>
  mov    0xc(%rsp),%r14d
  sub    %r12d,%r14d
  jmp    L293
  nopl   0x0(%rax,%rax,1)
L93:
  mov    %eax,%esi
  mov    %rcx,(%rdx)
  mov    %rcx,-0x8(%rdx,%rsi,1)
  lea    0x8(%rdx),%rsi
  and    $0xfffffffffffffff8,%rsi
  sub    %rsi,%rdx
  add    %edx,%eax
  and    $0xfffffff8,%eax
  cmp    $0x8,%eax
  jb     L53
  and    $0xfffffff8,%eax
  xor    %edx,%edx
L234:
  mov    %edx,%edi
  add    $0x8,%edx
  mov    %rcx,(%rsi,%rdi,1)
  cmp    %eax,%edx
  jb     L234
  jmp    L53
L349:
  mov    $0x2,%edx
  mov    $0xe,%ecx
  jmp    L327
L325:
  mov    $0x3,%edx
  mov    $0xd,%ecx
  jmp    L327
L138:
  mov    %ecx,(%rdx)
  mov    %ecx,-0x4(%rdx,%rax,1)
  jmp    L53
L62:
  mov    $0x4,%edx
  mov    $0xc,%ecx
  jmp    L327
L161:
  mov    $0x5,%edx
  mov    $0xb,%ecx
  jmp    L327
L12:
  mov    $0x6,%edx
  mov    $0xa,%ecx
  jmp    L327
L275:
  mov    $0x7,%edx
  mov    $0x9,%ecx
  jmp    L327
L343:
  mov    $0x8,%edx
  mov    $0x8,%ecx
  jmp    L327
L250:
  mov    $0x9,%edx
  mov    $0x7,%ecx
  jmp    L327
L301:
  mov    $0xa,%edx
  mov    $0x6,%ecx
  jmp    L327
L361:
  mov    $0xb,%edx
  mov    $0x5,%ecx
  jmp    L327
L331:
  mov    $0xc,%edx
  mov    $0x4,%ecx
  jmp    L327
L38:
  mov    $0xd,%edx
  mov    $0x3,%ecx
  jmp    L327
L368:
  mov    $0xe,%edx
  mov    $0x2,%ecx
  jmp    L327
L278:
  mov    $0xf,%edx
  mov    $0x1,%ecx
  jmp    L327
L113:
  mov    %cx,-0x2(%rdx,%rax,1)
  jmp    L53
L60:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int aesEncrypt(unsigned char *output, int outlen, unsigned char *input, int inlen, unsigned char *password) {
  unsigned long rk[((128) / 8 + 28)];
  unsigned char key[((128) / 8)];
  int nrounds;
  int totalout = outlen;
  memcpy(key, password, 16);
  nrounds = aesSetupEncrypt(rk, key, 128);
  while (inlen) {
    unsigned char plaintext[16];
    unsigned char ciphertext[16];
    unsigned int j;
    for (j = 0; j < 16; j++) {
      if (inlen) {
        plaintext[j] = *input++;
        inlen--;
      } else
        break;
    }
    char c = 16 - j;
    unsigned int orig_block_size = j;
    for (; j < 16; j++)
      plaintext[j] = c;
    aesDoEncrypt(rk, nrounds, plaintext, ciphertext);
    if (outlen < 16)
      return -1;
    memcpy(output, ciphertext, 16);
    output += 16;
    outlen -= 16;
    if (orig_block_size == 16 && inlen == 0) {
      memset(plaintext, 16, 16);
      aesDoEncrypt(rk, nrounds, plaintext, ciphertext);
      if (outlen < 16)
        return -1;
      memcpy(output, ciphertext, 16);
      output += 16;
      outlen -= 16;
    }
  }
  return totalout - outlen;
}
```