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

```asm
<TEM_ENC>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,%eax
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%rbp)
  mov    %al,-0x5c(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x44(%rbp)
  jmp    L108
L45:
  mov    -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
  addl   $0x1,-0x44(%rbp)
L108:
  cmpl   $0xf,-0x44(%rbp)
  jle    L45
  movzbl -0x5c(%rbp),%eax
  mov    %al,-0x20(%rbp)
  movb   $0x0,-0x1f(%rbp)
  movb   $0x0,-0x1e(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L32
L141:
  mov    -0x48(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%edx
  lea    0x13(%rdx),%ecx
  movzbl (%rax),%edx
  movslq %ecx,%rax
  mov    %dl,-0x30(%rbp,%rax,1)
  addl   $0x1,-0x48(%rbp)
L32:
  cmpl   $0xc,-0x48(%rbp)
  jle    L141
  lea    -0x30(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <minalpher_P@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L42
L44:
  mov    -0x40(%rbp),%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%edx
  mov    -0x40(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  xor    %eax,%edx
  mov    -0x40(%rbp),%eax
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
  addl   $0x1,-0x40(%rbp)
L42:
  cmpl   $0xf,-0x40(%rbp)
  jle    L44
  movzbl -0x20(%rbp),%eax
  xor    -0x5c(%rbp),%al
  mov    %al,-0x20(%rbp)
  movzbl -0x1f(%rbp),%eax
  mov    %al,-0x1f(%rbp)
  movzbl -0x1e(%rbp),%eax
  mov    %al,-0x1e(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L23
L96:
  mov    -0x48(%rbp),%eax
  add    $0x13,%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%ecx
  mov    -0x48(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x48(%rbp),%eax
  add    $0x13,%eax
  xor    %ecx,%edx
  cltq
  mov    %dl,-0x30(%rbp,%rax,1)
  addl   $0x1,-0x48(%rbp)
L23:
  cmpl   $0xc,-0x48(%rbp)
  jle    L96
  movl   $0x0,-0x3c(%rbp)
  jmp    L117
L9:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x88(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x3c(%rbp)
L117:
  cmpl   $0x1f,-0x3c(%rbp)
  jle    L9
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rcx
  lea    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <TweakGen@plt>
  movl   $0x0,-0x38(%rbp)
  jmp    L56
L137:
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x38(%rbp),%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%edx
  mov    -0x38(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x88(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x38(%rbp)
L56:
  cmpl   $0x1f,-0x38(%rbp)
  jle    L137
  mov    -0x88(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <minalpher_P@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L105
L12:
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%ecx
  mov    -0x34(%rbp),%eax
  cltq
  movzbl -0x30(%rbp,%rax,1),%edx
  mov    -0x34(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x88(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x34(%rbp)
L105:
  cmpl   $0x1f,-0x34(%rbp)
  jle    L12
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

assistant: ```c
void TEM_ENC(const unsigned char *_K, unsigned char _flag, const unsigned char *_N, unsigned long long _i, unsigned long long _j, unsigned char *_M, unsigned char *C_) {
  int d;
  unsigned char L[32];
  do {
    int u;
    for (u = 0; u < 16; u++)
      (L)[u] = (_K)[u];
  } while (0);
  L[16] = _flag;
  L[16 + 1] = 0x00;
  L[16 + 2] = 0x00;
  for (d = 0; d < 13; d++)
    L[d + 16 + 3] = _N[d];
  minalpher_P(L, 0);
  do {
    int u;
    for (u = 0; u < 16; u++)
      (L)[u] ^= (_K)[u];
  } while (0);
  L[16] ^= _flag;
  L[16 + 1] ^= 0x00;
  L[16 + 2] ^= 0x00;
  for (d = 0; d < 13; d++)
    L[d + 16 + 3] ^= _N[d];
  do {
    int u;
    for (u = 0; u < 32; u++)
      (C_)[u] = (_M)[u];
  } while (0);
  TweakGen(L, _i, _j);
  do {
    int u;
    for (u = 0; u < 32; u++)
      (C_)[u] ^= (L)[u];
  } while (0);
  minalpher_P(C_, 0);
  do {
    int u;
    for (u = 0; u < 32; u++)
      (C_)[u] ^= (L)[u];
  } while (0);
}
```