user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<bifidDecipher>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rcx,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  test   %r8d,%r8d
  jle    L36
  mov    %rdi,%r13
  mov    %esi,%r12d
  mov    %rdx,%rbp
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L8:
  lea    (%r14,%r12,1),%eax
  mov    %eax,0x10(%rsp)
  mov    %eax,%edx
  mov    0x14(%rsp),%eax
  cmp    %eax,%edx
  jle    L35
  mov    %eax,0x10(%rsp)
  mov    %eax,%r12d
  sub    %r14d,%r12d
L53:
  movslq %r14d,%rax
  add    0x18(%rsp),%rax
  xor    %r15d,%r15d
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L56:
  lea    (%r12,%r15,1),%eax
  mov    %r13,%rdi
  sar    %eax
  add    %r14d,%eax
  cltq
  movzbl 0x0(%rbp,%rax,1),%eax
  mov    %al,0x7(%rsp)
  mov    %r15d,%eax
  sar    %eax
  add    %r14d,%eax
  cltq
  movsbl 0x0(%rbp,%rax,1),%esi
  call   <index@plt>
  movsbl 0x7(%rsp),%esi
  mov    %r13,%rdi
  sub    %r13,%rax
  mov    %rax,%rbx
  call   <index@plt>
  movslq %ebx,%rsi
  imul   $0x66666667,%rsi,%rsi
  sub    %r13,%rax
  sar    $0x21,%rsi
  test   $0x1,%r15b
  jne    L107
  sar    $0x1f,%ebx
  mov    %eax,%r11d
  mov    0x8(%rsp),%rdx
  sub    %ebx,%esi
  sar    $0x1f,%r11d
  lea    (%rsi,%rsi,4),%r10d
  movslq %eax,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x21,%rsi
  sub    %r11d,%esi
  lea    (%rsi,%rsi,4),%esi
  sub    %esi,%eax
  add    %r10d,%eax
  cltq
  movzbl 0x0(%r13,%rax,1),%eax
  mov    %al,(%rdx,%r15,1)
  add    $0x1,%r15
  cmp    %r15d,%r12d
  jg     L56
L6:
  mov    0x10(%rsp),%ecx
  cmp    %ecx,0x14(%rsp)
  jle    L88
L1:
  mov    %ecx,%r14d
  jmp    L8
  xchg   %ax,%ax
L107:
  mov    %ebx,%r10d
  mov    0x8(%rsp),%rcx
  sar    $0x1f,%r10d
  sub    %r10d,%esi
  lea    (%rsi,%rsi,4),%esi
  sub    %esi,%ebx
  movslq %eax,%rsi
  sar    $0x1f,%eax
  imul   $0x66666667,%rsi,%rsi
  lea    (%rbx,%rbx,4),%r10d
  sar    $0x21,%rsi
  sub    %eax,%esi
  add    %esi,%r10d
  movslq %r10d,%r10
  movzbl 0x0(%r13,%r10,1),%eax
  mov    %al,(%rcx,%r15,1)
  add    $0x1,%r15
  cmp    %r15d,%r12d
  jg     L56
  mov    0x10(%rsp),%ecx
  cmp    %ecx,0x14(%rsp)
  jg     L1
L88:
  movslq %ecx,%rax
  add    0x18(%rsp),%rax
L78:
  movb   $0x0,(%rax)
  mov    0x18(%rsp),%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L35:
  test   %r12d,%r12d
  jg     L53
  jmp    L6
L36:
  mov    %rcx,%rax
  jmp    L78
```

assistant: ```c
char *bifidDecipher(char *key, int period, char *text, char *result, int len) {
  int i, j;
  char a, b;
  int a_ind, b_ind;
  int a_row, b_row;
  int a_col, b_col;
  for (i = 0; i < len; i += period) {
    if (i + period > len) {
      period = len - i;
    }
    for (j = 0; j < period; j++) {
      a = text[i + (j / 2)];
      b = text[i + ((period + j) / 2)];
      a_ind = (int)(index(key, a) - key);
      b_ind = (int)(index(key, b) - key);
      a_row = a_ind / 5;
      b_row = b_ind / 5;
      a_col = a_ind % 5;
      b_col = b_ind % 5;
      if (j % 2 == 0) {
        result[i + j] = key[5 * a_row + b_col];
      } else {
        result[i + j] = key[5 * a_col + b_row];
      }
    }
  }
  result[i] = '\0';
  return result;
}
```