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

```asm
<read_oid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x450,%rsp
  mov    %rdi,-0x438(%rbp)
  mov    %rsi,-0x440(%rbp)
  mov    %edx,-0x444(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x444(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x418(%rbp)
  lea    -0x430(%rbp),%rdx
  mov    -0x438(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <read_byte@plt>
  mov    %rax,-0x438(%rbp)
  mov    -0x430(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x4,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x410(%rbp)
  mov    -0x430(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x4,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    %edx,-0x40c(%rbp)
  movl   $0x2,-0x42c(%rbp)
  jmp    L58
L8:
  lea    -0x410(%rbp),%rdx
  mov    -0x42c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x438(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <read_oid_part@plt>
  mov    %rax,-0x438(%rbp)
  addl   $0x1,-0x42c(%rbp)
L58:
  mov    -0x438(%rbp),%rax
  cmp    -0x418(%rbp),%rax
  jb     L8
  mov    -0x42c(%rbp),%eax
  mov    %eax,-0x424(%rbp)
  mov    -0x424(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x428(%rbp)
  movl   $0x0,-0x42c(%rbp)
  jmp    L52
L16:
  mov    -0x42c(%rbp),%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  cltq
  mov    %rax,%rcx
  lea    D17(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <snprintf@plt>
  mov    %eax,%edx
  mov    -0x428(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x428(%rbp)
  addl   $0x1,-0x42c(%rbp)
L52:
  mov    -0x42c(%rbp),%eax
  cmp    -0x424(%rbp),%eax
  jl     L16
  mov    -0x428(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x440(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x440(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x420(%rbp)
  mov    -0x410(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%rax
  lea    D17(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  cltq
  add    %rax,-0x420(%rbp)
  movl   $0x1,-0x42c(%rbp)
  jmp    L57
L15:
  mov    -0x42c(%rbp),%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  movslq %eax,%rdx
  mov    -0x420(%rbp),%rax
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  cltq
  add    %rax,-0x420(%rbp)
  addl   $0x1,-0x42c(%rbp)
L57:
  mov    -0x42c(%rbp),%eax
  cmp    -0x424(%rbp),%eax
  jl     L15
  mov    -0x438(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L31
  call   <__stack_chk_fail@plt>
L31:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D17
datatype: string
name: retrieve_data
arguments: label: D14
datatype: string

tool: D17: %lu

tool: D14: .%lu

assistant: ```c
void *read_oid(void *src, char **oid, int size) {
  u_int64_t parts[256 + 1];
  int first_byte;
  int i;
  void *endp = (unsigned char *)src + size;
  int num_parts;
  int len;
  char *p;
  src = read_byte(src, &first_byte);
  parts[0] = first_byte / 40;
  parts[1] = first_byte % 40;
  i = 2;
  while (src < endp) {
    src = read_oid_part(src, &parts[i]);
    i++;
  }
  num_parts = i;
  len = num_parts - 1;
  for (i = 0; i < num_parts; i++) {
    len += snprintf(NULL, 0, "%lu", (unsigned long)parts[i]);
  }
  *oid = (char *)malloc(len + 1);
  p = *oid;
  p += sprintf(p, "%lu", (unsigned long)parts[0]);
  for (i = 1; i < num_parts; i++) {
    p += sprintf(p, ".%lu", (unsigned long)parts[i]);
  }
  return src;
}
```