user: Please show me the C implementation that matches the assembly code listed below:

```asm
<division>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r13
  mov    %esi,%ebp
  mov    %rdx,%r12
  mov    %ecx,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0x2e(%rsp),%rdi
  mov    $0xa,%esi
  call   <bzero@plt>
  lea    0x1a(%rsp),%r15
  mov    $0xa,%esi
  mov    %r15,%rdi
  call   <bzero@plt>
  lea    0x24(%rsp),%r14
  mov    $0xa,%esi
  mov    %r14,%rdi
  call   <bzero@plt>
  mov    $0x8,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <bcopy@plt>
  mov    $0x8,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <bcopy@plt>
  movslq %ebx,%rax
  cmpb   $0x0,0x24(%rsp,%rax,1)
  jne    L178
  test   %ebx,%ebx
  je     L71
L178:
  lea    0x24(%rsp),%rdx
  lea    0x1a(%rsp),%rdi
  mov    %ebx,%ecx
  mov    %ebp,%esi
  call   <compare@plt>
  cmp    $0x1,%eax
  je     L148
  cmp    $0x3,%eax
  je     L54
  lea    0x1a(%rsp),%rdi
  call   <get_highbit@plt>
  mov    %eax,%r14d
  mov    %eax,0x8(%rsp)
  lea    0x24(%rsp),%rdi
  call   <get_highbit@plt>
  mov    %eax,0xc(%rsp)
  mov    %ebp,%r15d
  sub    %ebx,%r15d
  cmp    $0x1,%r15d
  jle    L58
  sub    %eax,%r14d
  lea    (%r14,%r15,8),%r13d
L19:
  test   %r13d,%r13d
  jle    L216
  mov    $0x0,%r12d
  lea    0x24(%rsp),%r14
L23:
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <shiftleft@plt>
  mov    %eax,%ebx
  add    $0x1,%r12d
  cmp    %r12d,%r13d
  jne    L23
L216:
  mov    0x8(%rsp),%eax
  lea    (%rax,%r15,8),%eax
  sub    0xc(%rsp),%eax
  mov    %eax,0x8(%rsp)
  js     L193
  mov    $0x0,%r13d
  mov    $0x0,%r14d
  lea    0x24(%rsp),%r15
  jmp    L37
L71:
  lea    D82(%rip),%rdi
  call   <puts@plt>
  jmp    L133
L148:
  lea    D37(%rip),%rdi
  call   <puts@plt>
  lea    D114(%rip),%rdi
  call   <puts@plt>
  test   %ebp,%ebp
  js     L133
  movslq %ebp,%rbx
  lea    D35(%rip),%r12
L153:
  mov    %ebp,%edx
  sub    %ebx,%edx
  movzbl 0x1a(%rsp,%rbx,1),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%rbx
  test   %ebx,%ebx
  jns    L153
  jmp    L133
L54:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  lea    D15(%rip),%rdi
  call   <puts@plt>
L133:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L68
  mov    $0x1,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L58:
  mov    0x8(%rsp),%ecx
  mov    %ecx,%eax
  mov    0xc(%rsp),%esi
  sub    %esi,%eax
  add    $0x8,%eax
  sub    %esi,%ecx
  mov    %ecx,%r13d
  cmp    %ebp,%ebx
  cmovne %eax,%r13d
  jmp    L19
L177:
  mov    %ebx,%esi
  mov    %r15,%rdi
  call   <shiftright@plt>
  mov    %eax,%ebx
  add    $0x1,%r14d
  cmp    %r14d,0x8(%rsp)
  jl     L77
L37:
  lea    0x1a(%rsp),%rdi
  mov    %ebx,%ecx
  mov    %r15,%rdx
  mov    %ebp,%esi
  call   <compare@plt>
  mov    %eax,%r12d
  lea    0x2e(%rsp),%rdi
  mov    %r13d,%esi
  call   <shiftleft@plt>
  mov    %eax,%r13d
  sub    $0x2,%r12d
  cmp    $0x1,%r12d
  ja     L177
  cltq
  orb    $0x1,0x2e(%rsp,%rax,1)
  lea    0x1a(%rsp),%rdi
  mov    %ebx,%ecx
  mov    %r15,%rdx
  mov    %ebp,%esi
  call   <deduct@plt>
  mov    %eax,%ebp
  jmp    L177
L77:
  lea    D125(%rip),%rdi
  call   <puts@plt>
  lea    D89(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %r13d,%r13d
  js     L138
L136:
  movslq %r13d,%rbx
  lea    D83(%rip),%r12
L42:
  mov    %r13d,%edx
  sub    %ebx,%edx
  movzbl 0x2e(%rsp,%rbx,1),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%rbx
  test   %ebx,%ebx
  jns    L42
L138:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D0(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  test   %ebp,%ebp
  js     L27
  movslq %ebp,%rbx
  lea    D83(%rip),%r12
L238:
  mov    %ebp,%edx
  sub    %ebx,%edx
  movzbl 0x1a(%rsp,%rbx,1),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%rbx
  test   %ebx,%ebx
  jns    L238
L27:
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L133
L193:
  lea    D125(%rip),%rdi
  call   <puts@plt>
  lea    D89(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%r13d
  jmp    L136
L68:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D82
type: string
name: unpack_data
arguments: data_tag: D37
type: string
name: unpack_data
arguments: data_tag: D114
type: string
name: unpack_data
arguments: data_tag: D35
type: string
name: unpack_data
arguments: data_tag: D102
type: string
name: unpack_data
arguments: data_tag: D15
type: string
name: unpack_data
arguments: data_tag: D125
type: string
name: unpack_data
arguments: data_tag: D89
type: string
name: unpack_data
arguments: data_tag: D83
type: string
name: unpack_data
arguments: data_tag: D0
type: string

tool: D82: Please don't let divisor = 0

tool: D37: quotient is 0

tool: D114: reminder: 

tool: D35: + %d * 256^%d


tool: D102: quotient is 1

tool: D15: remainder is 0

tool: D125: 


tool: D89: quotient:  

tool: D83: + %d *256^%d

tool: D0: reminder:  

assistant: ```c
int division(unsigned char *dividend, int a_len, unsigned char *divisor, int b_len) {
  int i, j = 0, comp, number = 0, b_shift_len = b_len, quo_len = 0, quo_total_len;
  int a_highbit, b_highbit;
  unsigned char a[10], b[10], quotient[10];
  bzero(quotient, sizeof(quotient));
  bzero(a, sizeof(a));
  bzero(b, sizeof(b));
  bcopy(dividend, a, sizeof(dividend));
  bcopy(divisor, b, sizeof(divisor));
  if ((b[b_len] == 0) && (b_len == 0)) {
    printf("Please don't let divisor = 0\n");
    return 1;
  }
  comp = compare(a, a_len, b, b_len);
  switch (comp) {
  case 1:
    printf("quotient is 0\n");
    printf("reminder: \n");
    for (i = a_len, j = 0; i >= 0; i--, j++)
      printf("+ %d * 256^%d\n", a[i], j);
    return 1;
  case 3:
    printf("quotient is 1\n");
    printf("remainder is 0\n");
    return 1;
  }
  a_highbit = get_highbit(a);
  b_highbit = get_highbit(b);
  if (a_len - b_len >= 2) {
    number = (a_len - b_len - 1) << 3;
    number += a_highbit - b_highbit + 8;
  } else if (a_len - b_len)
    number = a_highbit - b_highbit + 8;
  else
    number = a_highbit - b_highbit;
  for (i = 0; i < number; i++)
    b_shift_len = shiftleft(b, b_shift_len);
  quo_total_len = ((a_len - b_len) << 3) + a_highbit - b_highbit;
  for (i = 0; i <= quo_total_len; i++) {
    comp = compare(a, a_len, b, b_shift_len);
    quo_len = shiftleft(quotient, quo_len);
    switch (comp) {
    case 1:
      break;
    case 2:
    case 3:
      quotient[quo_len] |= 0x1;
      a_len = deduct(a, a_len, b, b_shift_len);
      break;
    }
    b_shift_len = shiftright(b, b_shift_len);
  }
  printf("\n\n");
  printf("quotient:  ");
  for (i = quo_len, j = 0; i >= 0; i--, j++)
    printf("+ %d *256^%d", quotient[i], j);
  printf("\n");
  printf("reminder:  ");
  for (i = a_len, j = 0; i >= 0; i--, j++)
    printf("+ %d *256^%d", a[i], j);
  printf("\n");
  return 1;
}
```