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

```asm
<bcd_div>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rcx,%r12
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  mov    %r9,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cmpb   $0x31,(%rsi)
  je     L212
L191:
  test   %r13d,%r13d
  jle    L202
  lea    0x1(%r15),%rsi
  mov    %r12,%rdx
  lea    -0x1(%r13),%eax
  mov    %r13d,%ecx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L2
  cmp    $0x6,%eax
  jbe    L2
  cmp    $0xe,%eax
  jbe    L274
  mov    %r13d,%edx
  xor    %eax,%eax
  shr    $0x4,%edx
  shl    $0x4,%rdx
  nop
L7:
  movdqu (%r15,%rax,1),%xmm0
  movups %xmm0,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L7
  mov    %r13d,%edx
  and    $0xfffffff0,%edx
  mov    %edx,%eax
  cmp    %edx,%r13d
  je     L202
  mov    %r13d,%ecx
  sub    %edx,%ecx
  lea    -0x1(%rcx),%esi
  cmp    $0x6,%esi
  jbe    L41
L217:
  mov    (%r15,%rdx,1),%rsi
  mov    %rsi,(%r12,%rdx,1)
  mov    %ecx,%edx
  and    $0xfffffff8,%edx
  add    %edx,%eax
  cmp    %edx,%ecx
  je     L202
L41:
  movslq %eax,%rdx
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  jle    L202
  movslq %edx,%rdx
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%r13d
  jle    L202
  movslq %edx,%rdx
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%r13d
  jle    L202
  movslq %edx,%rdx
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%r13d
  jle    L202
  movslq %edx,%rdx
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%r13d
  jle    L202
  movslq %edx,%rdx
  add    $0x6,%eax
  movzbl (%r15,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  cmp    %eax,%r13d
  jle    L202
  cltq
  movzbl (%r15,%rax,1),%edx
  mov    %dl,(%r12,%rax,1)
L202:
  xor    %r14d,%r14d
  jmp    L50
  nopl   0x0(%rax)
L117:
  mov    %r12,%rcx
  mov    %r13d,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <bcd_sub@plt>
  add    $0x1,%r14d
L50:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <bcd_gt@plt>
  cmp    $0x1,%eax
  je     L117
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <bcd_eq@plt>
  cmp    $0x1,%eax
  je     L117
  mov    %r12,%rdx
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <bcd_encode@plt>
  movslq %r13d,%rax
  mov    %rsp,%rcx
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L218
L51:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L51
L218:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L186
L84:
  mov    %rsp,%rcx
  mov    %r13d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <bcd_mul@plt>
  mov    -0x48(%rbp),%rcx
  mov    %r13d,%edx
  mov    %rsp,%rsi
  mov    %r15,%rdi
  call   <bcd_sub@plt>
  xor    %eax,%eax
L144:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L180
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L212:
  cmpb   $0x30,0x1(%rsi)
  jne    L191
  mov    $0xffffffff,%eax
  jmp    L144
  nopl   0x0(%rax)
L186:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L84
L2:
  mov    %r13d,%ecx
  xor    %eax,%eax
  nopl   (%rax)
L6:
  movzbl (%r15,%rax,1),%edx
  mov    %dl,(%r12,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L6
  jmp    L202
L274:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L217
L180:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int bcd_div(char *s, char *t, int n, char *u, int m, char *v) {
  if ((t[0] - 48) == 1 && (t[1] - 48) == 0) {
    return -1;
  }
  int i;
  for (i = 0; i < n; i++) {
    u[i] = s[i];
  }
  int j;
  j = 0;
  while (bcd_gt(u, t) == 1 || bcd_eq(u, t) == 1) {
    bcd_sub(u, t, n, u);
    j++;
  }
  bcd_encode(j, n, u);
  char tmp[n];
  bcd_mul(t, u, n, tmp);
  bcd_sub(s, tmp, n, v);
  return 0;
}
```