user: Converte this assembly snippet into its equivalent C code:

```asm
<division>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x98(%rbp)
  mov    %esi,-0x9c(%rbp)
  mov    %rdx,-0xa8(%rbp)
  mov    %ecx,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x80(%rbp)
  movl   $0x0,-0x7c(%rbp)
  mov    -0xa0(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  lea    -0x20(%rbp),%rax
  mov    $0x14,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  lea    -0x60(%rbp),%rax
  mov    $0x14,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  lea    -0x40(%rbp),%rax
  mov    $0x14,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  movl   $0x13,-0x84(%rbp)
  jmp    L169
L264:
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x84(%rbp),%eax
  cltq
  mov    %dl,-0x60(%rbp,%rax,1)
  subl   $0x1,-0x84(%rbp)
L169:
  mov    $0x13,%eax
  sub    -0x9c(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jge    L264
  movl   $0x13,-0x84(%rbp)
  jmp    L146
L255:
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x84(%rbp),%eax
  cltq
  mov    %dl,-0x40(%rbp,%rax,1)
  subl   $0x1,-0x84(%rbp)
L146:
  mov    $0x13,%eax
  sub    -0xa0(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jge    L255
  movzbl -0x2d(%rbp),%eax
  test   %al,%al
  jne    L251
  cmpl   $0x0,-0xa0(%rbp)
  jne    L251
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L63
L251:
  mov    -0xa0(%rbp),%ecx
  lea    -0x40(%rbp),%rdx
  mov    -0x9c(%rbp),%esi
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <compare@plt>
  mov    %eax,-0x70(%rbp)
  cmpl   $0x1,-0x70(%rbp)
  je     L268
  cmpl   $0x3,-0x70(%rbp)
  je     L236
  jmp    L97
L268:
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x13,-0x84(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L100
L217:
  mov    -0x84(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    -0x80(%rbp),%edx
  mov    %eax,%esi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  subl   $0x1,-0x84(%rbp)
  addl   $0x1,-0x80(%rbp)
L100:
  mov    $0x13,%eax
  sub    -0x9c(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jge    L217
  mov    $0x1,%eax
  jmp    L63
L236:
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L63
L97:
  mov    -0x9c(%rbp),%edx
  lea    -0x60(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <get_highbit@plt>
  mov    %eax,-0x6c(%rbp)
  mov    -0xa0(%rbp),%edx
  lea    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <get_highbit@plt>
  mov    %eax,-0x68(%rbp)
  mov    -0x9c(%rbp),%eax
  sub    -0xa0(%rbp),%eax
  cmp    $0x1,%eax
  jle    L194
  mov    -0x9c(%rbp),%eax
  sub    -0xa0(%rbp),%eax
  sub    $0x1,%eax
  shl    $0x3,%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x6c(%rbp),%eax
  sub    -0x68(%rbp),%eax
  add    $0x8,%eax
  add    %eax,-0x7c(%rbp)
  jmp    L199
L194:
  mov    -0x9c(%rbp),%eax
  cmp    -0xa0(%rbp),%eax
  je     L133
  mov    -0x6c(%rbp),%eax
  sub    -0x68(%rbp),%eax
  add    $0x8,%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L199
L133:
  mov    -0x6c(%rbp),%eax
  sub    -0x68(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
L199:
  movl   $0x0,-0x84(%rbp)
  jmp    L52
L2:
  mov    -0x78(%rbp),%edx
  lea    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shiftleft@plt>
  mov    %eax,-0x78(%rbp)
  addl   $0x1,-0x84(%rbp)
L52:
  mov    -0x84(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L2
  mov    -0x9c(%rbp),%eax
  sub    -0xa0(%rbp),%eax
  lea    0x0(,%rax,8),%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  sub    -0x68(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  movl   $0x0,-0x84(%rbp)
  jmp    L271
L227:
  mov    -0x74(%rbp),%edx
  lea    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shiftleft@plt>
  mov    %eax,-0x74(%rbp)
  mov    -0x78(%rbp),%ecx
  lea    -0x40(%rbp),%rdx
  mov    -0x9c(%rbp),%esi
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <compare@plt>
  mov    %eax,-0x70(%rbp)
  cmpl   $0x1,-0x70(%rbp)
  je     L209
  cmpl   $0x0,-0x70(%rbp)
  jle    L110
  mov    -0x70(%rbp),%eax
  sub    $0x2,%eax
  cmp    $0x1,%eax
  ja     L110
  movzbl -0xd(%rbp),%eax
  or     $0x1,%eax
  mov    %al,-0xd(%rbp)
  mov    -0x78(%rbp),%ecx
  lea    -0x40(%rbp),%rdx
  mov    -0x9c(%rbp),%esi
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <deduct@plt>
  mov    %eax,-0x9c(%rbp)
  jmp    L110
L209:
  nop
L110:
  mov    -0x78(%rbp),%edx
  lea    -0x40(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <shiftright@plt>
  mov    %eax,-0x78(%rbp)
  addl   $0x1,-0x84(%rbp)
L271:
  mov    -0x84(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jle    L227
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x13,-0x84(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L136
L135:
  mov    -0x84(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    -0x80(%rbp),%edx
  mov    %eax,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  subl   $0x1,-0x84(%rbp)
  addl   $0x1,-0x80(%rbp)
L136:
  mov    $0x13,%eax
  sub    -0x74(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jge    L135
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x13,-0x84(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L177
L31:
  mov    -0x84(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  movzbl %al,%eax
  mov    -0x80(%rbp),%edx
  mov    %eax,%esi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  subl   $0x1,-0x84(%rbp)
  addl   $0x1,-0x80(%rbp)
L177:
  mov    $0x13,%eax
  sub    -0x9c(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jge    L31
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x1,%eax
L63:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D5
type_infered: string
name: unpack_data
arguments: tag: D40
type_infered: string
name: unpack_data
arguments: tag: D29
type_infered: string
name: unpack_data
arguments: tag: D54
type_infered: string
name: unpack_data
arguments: tag: D9
type_infered: string
name: unpack_data
arguments: tag: D76
type_infered: string
name: unpack_data
arguments: tag: D26
type_infered: string
name: unpack_data
arguments: tag: D17
type_infered: string
name: unpack_data
arguments: tag: D16
type_infered: string
name: unpack_data
arguments: tag: D52
type_infered: string

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

tool: D40: quotient is 0

tool: D29: reminder: 

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


tool: D9: quotient is 1

tool: D76: remainder is 0

tool: D26: 


tool: D17: quotient:  

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

tool: D52: 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[20], b[20], quotient[20];
  bzero(quotient, sizeof(quotient));
  bzero(a, sizeof(a));
  bzero(b, sizeof(b));
  for (i = 20 - 1; i >= 20 - 1 - a_len; i--)
    a[i] = dividend[i];
  for (i = 20 - 1; i >= 20 - 1 - b_len; i--)
    b[i] = divisor[i];
  if ((b[20 - 1] == 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 = 20 - 1, j = 0; i >= 20 - 1 - a_len; 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, a_len);
  b_highbit = get_highbit(b, b_len);
  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++) {
    quo_len = shiftleft(quotient, quo_len);
    comp = compare(a, a_len, b, b_shift_len);
    switch (comp) {
    case 1:
      break;
    case 2:
    case 3:
      quotient[20 - 1] |= 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 = 20 - 1, j = 0; i >= 20 - 1 - quo_len; i--, j++)
    printf("+ %d *256^%d", quotient[i], j);
  printf("\n");
  printf("reminder:  ");
  for (i = 20 - 1, j = 0; i >= 20 - 1 - a_len; i--, j++)
    printf("+ %d *256^%d", a[i], j);
  printf("\n");
  return 1;
}
```