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

```asm
<decode_oid>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  mov    $0x1,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x64,%edi
  sub    $0x18,%rsp
  call   <calloc@plt>
  mov    $0x1,%esi
  mov    $0x6,%edi
  mov    %rax,%rbp
  call   <calloc@plt>
  mov    %rax,%r14
  mov    (%r15),%eax
  lea    0x1(%rax),%edx
  add    $0x2,%eax
  mov    %edx,(%r15)
  movzbl (%rbx,%rdx,1),%r13d
  mov    %eax,(%r15)
  cmpb   $0x2b,(%rbx,%rax,1)
  je     L69
L5:
  sub    $0x1,%r13b
  je     L66
  xor    %ecx,%ecx
  lea    D14(%rip),%r12
  jmp    L38
  nopl   0x0(%rax,%rax,1)
L22:
  test   %ecx,%ecx
  je     L51
  or     %ecx,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  xor    %ecx,%ecx
L86:
  sub    $0x1,%r13b
  je     L66
L38:
  mov    (%r15),%eax
  add    $0x1,%eax
  mov    %eax,(%r15)
  movzbl (%rbx,%rax,1),%edx
  test   %dl,%dl
  jns    L22
  and    $0x7f,%edx
  or     %ecx,%edx
  mov    %edx,%ecx
  shl    $0x7,%ecx
  sub    $0x1,%r13b
  jne    L38
L66:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x1,%edi
  lea    0x1(%rax),%esi
  call   <calloc@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strcpy@plt>
  addl   $0x1,(%r15)
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r14,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L51:
  mov    %r12,%rsi
  mov    %r14,%rdi
  mov    %ecx,0xc(%rsp)
  call   <sprintf@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0xc(%rsp),%ecx
  jmp    L86
  nopl   0x0(%rax,%rax,1)
L69:
  lea    D18(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L5
```

tool_calls: name: unpack_data
arguments: data_tag: D14
data_type: string
name: unpack_data
arguments: data_tag: D18
data_type: string

tool: D14: .%d

tool: D18: 1.3

assistant: ```c
unsigned char *decode_oid(unsigned char *array, unsigned int *pointer) {
  unsigned char *string = NULL;
  unsigned char *buffer = (unsigned char *)calloc(100, sizeof(unsigned char));
  unsigned char *number = (unsigned char *)calloc(6, sizeof(unsigned char));
  unsigned int oid_node, oid_node_long = 0;
  *pointer = *pointer + 1;
  unsigned char length = array[*pointer];
  *pointer = *pointer + 1;
  if (array[*pointer] == 0x2b) {
    strcat((char *)buffer, "1.3");
  }
  length--;
  while (length) {
    *pointer = *pointer + 1;
    oid_node = array[*pointer];
    if (oid_node & 0x80) {
      oid_node_long |= oid_node & 0x7f;
      oid_node_long = oid_node_long << 7;
    } else {
      if (oid_node_long) {
        oid_node_long |= oid_node;
        sprintf((char *)number, ".%d", oid_node_long);
        strcat((char *)buffer, (char *)number);
        oid_node_long = 0;
      } else {
        sprintf((char *)number, ".%d", oid_node);
        strcat((char *)buffer, (char *)number);
      }
    }
    length--;
  }
  string = (unsigned char *)calloc(1, strlen((char *)buffer) + 1);
  strcpy((char *)string, (char *)buffer);
  *pointer = *pointer + 1;
  free(buffer);
  free(number);
  return string;
}
```