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

```asm
<dec_to_bin>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x19(%rbp)
  cmpb   $0x5f,-0x19(%rbp)
  jne    L111
  addq   $0x1,-0x30(%rbp)
  jmp    L42
L111:
  movb   $0x0,-0x19(%rbp)
L42:
  mov    -0x28(%rbp),%rax
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    $0x7f,%rax
  mov    %rax,-0x10(%rbp)
  sub    $0x30,%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L161
L164:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  mov    %al,-0x1a(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L75
L27:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  movzbl -0x1a(%rbp),%eax
  add    %edx,%eax
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  sar    $0x8,%rax
  mov    %al,-0x1a(%rbp)
  subq   $0x1,-0x18(%rbp)
L75:
  mov    -0x18(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jae    L27
  addq   $0x1,-0x30(%rbp)
L161:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L146
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L164
L146:
  cmpb   $0x0,-0x19(%rbp)
  je     L53
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L108
L72:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
L108:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jbe    L72
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L32
L105:
  subq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
L32:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L53
  mov    -0x18(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  ja     L105
L53:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L133
L81:
  addq   $0x1,-0x18(%rbp)
L133:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L0
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L81
  jmp    L0
L7:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <putoct@plt>
  cltq
  add    %rax,-0x28(%rbp)
L0:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jbe    L7
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *dec_to_bin(unsigned char *to, char *from) {
  unsigned char *b, carryc, minus, *ebuf;
  long prod;
  if ((minus = *from) == '_')
    from++;
  else
    minus = 0;
  memset(to, 0, 128);
  for (*(ebuf = &to[128 - 1]) = *from++ - '0'; *from >= '0' && *from <= '9'; from++) {
    for (carryc = *from - '0', b = ebuf; b >= to; b--) {
      prod = (*b * 10) + carryc;
      *b = (prod & 0xFF);
      carryc = (unsigned char)(prod >> 8);
    }
  }
  if (minus) {
    for (b = to; b <= ebuf; *b = ~*b, b++)
      ;
    for (b = ebuf, (*b)++; !*b && b > to; b--, (*b)++)
      ;
  }
  for (b = to; *b == *to && b < ebuf; b++)
    ;
  while (b <= ebuf)
    to += putoct((char *)to, (long)*b++);
  *to = 0;
  return from;
}
```