user: Translate the below assembly code into C programming language:

```asm
<MFRC522_ToCard>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rsi,-0x20(%rbp)
  mov    %edx,%eax
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %edi,%edx
  mov    %dl,-0x14(%rbp)
  mov    %al,-0x18(%rbp)
  movb   $0x2,-0x9(%rbp)
  movb   $0x0,-0x8(%rbp)
  movb   $0x0,-0x7(%rbp)
  movsbl -0x14(%rbp),%eax
  cmp    $0xc,%eax
  je     L169
  cmp    $0xe,%eax
  jne    L35
  movb   $0x12,-0x8(%rbp)
  movb   $0x10,-0x7(%rbp)
  jmp    L65
L169:
  movb   $0x77,-0x8(%rbp)
  movb   $0x30,-0x7(%rbp)
  jmp    L65
L35:
  nop
L65:
  movzbl -0x8(%rbp),%eax
  or     $0xffffff80,%eax
  movsbl %al,%eax
  mov    %eax,%esi
  mov    $0x2,%edi
  call   <MFRC522_Wr@plt>
  mov    $0x80,%esi
  mov    $0x4,%edi
  call   <MFRC522_Clear_Bit@plt>
  mov    $0x80,%esi
  mov    $0xa,%edi
  call   <MFRC522_Set_Bit@plt>
  mov    $0x0,%esi
  mov    $0x1,%edi
  call   <MFRC522_Wr@plt>
  movl   $0x0,-0x4(%rbp)
  jmp    L93
L50:
  mov    -0x4(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  mov    $0x9,%edi
  call   <MFRC522_Wr@plt>
  addl   $0x1,-0x4(%rbp)
L93:
  movsbl -0x18(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  jb     L50
  movsbl -0x14(%rbp),%eax
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <MFRC522_Wr@plt>
  cmpb   $0xc,-0x14(%rbp)
  jne    L75
  mov    $0x80,%esi
  mov    $0xd,%edi
  call   <MFRC522_Set_Bit@plt>
L75:
  movl   $0xffff,-0x4(%rbp)
L15:
  mov    $0x4,%edi
  call   <MFRC522_Rd@plt>
  mov    %al,-0x6(%rbp)
  subl   $0x1,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L87
  movsbl -0x6(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L87
  movzbl -0x6(%rbp),%eax
  and    -0x7(%rbp),%al
  test   %al,%al
  je     L15
L87:
  mov    $0x80,%esi
  mov    $0xd,%edi
  call   <MFRC522_Clear_Bit@plt>
  cmpl   $0x0,-0x4(%rbp)
  je     L118
  mov    $0x6,%edi
  call   <MFRC522_Rd@plt>
  and    $0x1b,%eax
  test   %eax,%eax
  jne    L36
  movb   $0x0,-0x9(%rbp)
  movzbl -0x6(%rbp),%eax
  and    -0x8(%rbp),%al
  movsbl %al,%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L60
  movb   $0x1,-0x9(%rbp)
L60:
  cmpb   $0xc,-0x14(%rbp)
  jne    L118
  mov    $0xa,%edi
  call   <MFRC522_Rd@plt>
  mov    %al,-0x6(%rbp)
  mov    $0xc,%edi
  call   <MFRC522_Rd@plt>
  and    $0x7,%eax
  mov    %al,-0x5(%rbp)
  cmpb   $0x0,-0x5(%rbp)
  je     L189
  movsbl -0x6(%rbp),%eax
  sub    $0x1,%eax
  lea    0x0(,%rax,8),%edx
  movsbl -0x5(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L68
L189:
  movsbl -0x6(%rbp),%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
L68:
  cmpb   $0x0,-0x6(%rbp)
  jne    L11
  movb   $0x1,-0x6(%rbp)
L11:
  cmpb   $0x10,-0x6(%rbp)
  jle    L183
  movb   $0x10,-0x6(%rbp)
L183:
  movl   $0x0,-0x4(%rbp)
  jmp    L162
L144:
  mov    $0x9,%edi
  call   <MFRC522_Rd@plt>
  mov    %eax,%edx
  mov    -0x4(%rbp),%ecx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x1,-0x4(%rbp)
L162:
  movsbl -0x6(%rbp),%eax
  cmp    %eax,-0x4(%rbp)
  jb     L144
  mov    -0x4(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L118
L36:
  movb   $0x2,-0x9(%rbp)
L118:
  movzbl -0x9(%rbp),%eax
  leave
  ret
```

assistant: ```c
char MFRC522_ToCard(char command, char *sendData, char sendLen, char *backData, unsigned *backLen) {
  char _status = 2;
  char irqEn = 0x00;
  char waitIRq = 0x00;
  char lastBits;
  char n;
  unsigned i;
  switch (command) {
  case 0x0E: {
    irqEn = 0x12;
    waitIRq = 0x10;
    break;
  }
  case 0x0C: {
    irqEn = 0x77;
    waitIRq = 0x30;
    break;
  }
  default:
    break;
  }
  MFRC522_Wr(0x02, irqEn | 0x80);
  MFRC522_Clear_Bit(0x04, 0x80);
  MFRC522_Set_Bit(0x0A, 0x80);
  MFRC522_Wr(0x01, 0x00);
  for (i = 0; i < sendLen; i++) {
    MFRC522_Wr(0x09, sendData[i]);
  }
  MFRC522_Wr(0x01, command);
  if (command == 0x0C) {
    MFRC522_Set_Bit(0x0D, 0x80);
  }
  i = 0xFFFF;
  do {
    n = MFRC522_Rd(0x04);
    i--;
  } while (i && !(n & 0x01) && !(n & waitIRq));
  MFRC522_Clear_Bit(0x0D, 0x80);
  if (i != 0) {
    if (!(MFRC522_Rd(0x06) & 0x1B)) {
      _status = 0;
      if (n & irqEn & 0x01) {
        _status = 1;
      }
      if (command == 0x0C) {
        n = MFRC522_Rd(0x0A);
        lastBits = MFRC522_Rd(0x0C) & 0x07;
        if (lastBits) {
          *backLen = (n - 1) * 8 + lastBits;
        } else {
          *backLen = n * 8;
        }
        if (n == 0) {
          n = 1;
        }
        if (n > 16) {
          n = 16;
        }
        for (i = 0; i < n; i++) {
          backData[i] = MFRC522_Rd(0x09);
        }
        backData[i] = 0;
      }
    } else {
      _status = 2;
    }
  }
  return _status;
}
```