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

```asm
<udev_node_update_old_links>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    %rsi,0x8(%rsp)
  call   <udev_device_get_udev@plt>
  mov    %rbx,%rdi
  mov    %rax,%r14
  call   <udev_device_get_devlinks_list_entry@plt>
  test   %rax,%rax
  je     L107
  mov    %rax,%r12
  lea    D2(%rip),%rbx
  jmp    L58
  nopw   0x0(%rax,%rax,1)
L80:
  mov    %r12,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L107
L58:
  mov    %r12,%rdi
  call   <udev_list_entry_get_name@plt>
  mov    %r13,%rdi
  mov    %rax,%rbp
  call   <udev_device_get_devnode@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L80
  mov    %r13,%rdi
  call   <udev_device_get_devlinks_list_entry@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L4
  nop
L15:
  mov    %r15,%rdi
  call   <udev_list_entry_get_name@plt>
  mov    %rbp,%rdi
  mov    %rax,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L80
  mov    %r15,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%r15
  test   %rax,%rax
  jne    L15
L4:
  mov    %r13,%rdi
  call   <udev_device_get_devpath@plt>
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  mov    %rax,%rcx
  call   <udev_log_null@plt>
  mov    %r13,%rdi
  call   <udev_device_get_devpath@plt>
  xor    %ecx,%ecx
  mov    %rbp,%rdx
  mov    %r14,%rdi
  mov    %rax,%rsi
  call   <name_index@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <update_link@plt>
  mov    %r12,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%r12
  test   %rax,%rax
  jne    L58
  nopl   0x0(%rax,%rax,1)
L107:
  mov    0x8(%rsp),%rdi
  call   <udev_device_get_devnode@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L25
  mov    %r13,%rdi
  call   <udev_device_get_devnode@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L25
  mov    %rax,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L44
L25:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L44:
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D16(%rip),%rsi
  mov    %r14,%rdi
  call   <udev_log_null@plt>
  mov    %r13,%rdi
  call   <udev_device_get_devpath@plt>
  mov    %r14,%rdi
  mov    %rbp,%rdx
  xor    %ecx,%ecx
  mov    %rax,%rsi
  call   <name_index@plt>
  add    $0x18,%rsp
  mov    %rbp,%rsi
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1100 <update_link@plt>
```

tool_calls: name: read_data
arguments: label: D2
type: string
name: read_data
arguments: label: D16
type: string

tool: D2: update old name, '%s' no longer belonging to '%s'


tool: D16: node has changed from '%s' to '%s'


assistant: ```c
void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old) {
  struct udev *udev = udev_device_get_udev(dev);
  struct udev_list_entry *list_entry;
  const char *devnode_old;
  for (list_entry = udev_device_get_devlinks_list_entry(dev_old); list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry)) {
    const char *name = udev_list_entry_get_name(list_entry);
    struct udev_list_entry *list_entry_current;
    int found;
    if (strcmp(name, udev_device_get_devnode(dev)) == 0)
      continue;
    found = 0;
    for (list_entry_current = udev_device_get_devlinks_list_entry(dev); list_entry_current != NULL; list_entry_current = udev_list_entry_get_next(list_entry_current)) {
      const char *name_current = udev_list_entry_get_name(list_entry_current);
      if (strcmp(name, name_current) == 0) {
        found = 1;
        break;
      }
    }
    if (found)
      continue;
    udev_log_null(udev, "update old name, '%s' no longer belonging to '%s'\n", name, udev_device_get_devpath(dev));
    name_index(udev, udev_device_get_devpath(dev), name, 0);
    update_link(dev, name);
  }
  devnode_old = udev_device_get_devnode(dev_old);
  if (devnode_old != NULL) {
    const char *devnode = udev_device_get_devnode(dev);
    if (devnode != NULL && strcmp(devnode_old, devnode) != 0) {
      udev_log_null(udev, "node has changed from '%s' to '%s'\n", devnode_old, devnode);
      name_index(udev, udev_device_get_devpath(dev), devnode_old, 0);
      update_link(dev, devnode_old);
    }
  }
}
```