user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<udev_node_remove>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x428,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <udev_device_get_udev@plt>
  mov    %r12,%rdi
  mov    %rax,%r13
  call   <udev_device_get_devlinks_list_entry@plt>
  test   %rax,%rax
  je     L7
  mov    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L34:
  mov    %rbp,%rdi
  call   <udev_list_entry_get_name@plt>
  xor    %edx,%edx
  mov    %r12,%rdi
  mov    %eax,%esi
  call   <link_update@plt>
  mov    %rbp,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L34
L7:
  mov    %r12,%rdi
  xor    %r15d,%r15d
  call   <udev_device_get_devnode@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L39
  lea    0x8(%rsp),%rsi
  mov    %rax,%rdi
  call   <stat@plt>
  test   %rax,%rax
  jne    L2
  mov    0x8(%rsp),%rbp
  mov    %r12,%rdi
  call   <udev_device_get_devnum@plt>
  cmp    %rax,%rbp
  jne    L26
  mov    %r12,%rdi
  call   <udev_device_get_syspath@plt>
  mov    %r13,%rdi
  mov    %eax,%esi
  call   <udev_device_new_from_syspath@plt>
  mov    %r14,%rdx
  mov    %rax,%rbp
  test   %rax,%rax
  je     L101
  mov    %r13,%rdi
  lea    D30(%rip),%rsi
  call   <udev_log_null@plt>
  mov    %rbp,%rdi
  call   <udev_device_unref@plt>
L39:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x428,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L2:
  mov    %r14,%rdx
  lea    D58(%rip),%rsi
  mov    %r13,%rdi
  call   <udev_log_null@plt>
  jmp    L39
  nopl   0x0(%rax)
L101:
  lea    D39(%rip),%rsi
  mov    %r13,%rdi
  call   <udev_log_null@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <util_unlink_secure@plt>
  mov    %eax,%r15d
  test   %eax,%eax
  je     L43
L84:
  mov    %r12,%rdi
  lea    D66(%rip),%rbp
  call   <udev_device_get_devnum@plt>
  mov    %rax,%rdi
  call   <minor@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <udev_device_get_devnum@plt>
  mov    %rax,%rdi
  call   <major@plt>
  mov    %r12,%rdi
  lea    0x10(%rsp),%r12
  mov    %eax,%r14d
  call   <udev_device_get_subsystem@plt>
  mov    %rbp,%rsi
  mov    %eax,%edi
  call   <strcmp@plt>
  mov    %r13,%rdi
  test   %rax,%rax
  lea    D41(%rip),%rax
  cmovne %rax,%rbp
  call   <udev_get_dev_path@plt>
  sub    $0x8,%rsp
  mov    %r14d,%r9d
  mov    %r12,%rdi
  push   %rbx
  lea    D7(%rip),%rdx
  mov    %rax,%rcx
  mov    %rbp,%r8
  mov    $0x400,%esi
  call   <snprintf@plt>
  mov    %r12,%rdi
  call   <unlink@plt>
  pop    %rax
  pop    %rdx
  jmp    L39
L43:
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <util_delete_path@plt>
  jmp    L84
L26:
  mov    %r14,%rdx
  lea    D38(%rip),%rsi
  mov    %r13,%rdi
  mov    $0xffffffff,%r15d
  call   <udev_log_null@plt>
  jmp    L39
L18:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D30
type: string
name: parse_data
arguments: tag: D58
type: string
name: parse_data
arguments: tag: D39
type: string
name: parse_data
arguments: tag: D66
type: string
name: parse_data
arguments: tag: D41
type: string
name: parse_data
arguments: tag: D7
type: string
name: parse_data
arguments: tag: D38
type: string

tool: D30: keeping device node of existing device'%s'


tool: D58: device node '%s' not found


tool: D39: removing device node '%s'


tool: D66: block

tool: D41: char

tool: D7: %s/%s/%u:%u

tool: D38: device node '%s' points to a different device, skip removal


assistant: ```c
int udev_node_remove(struct udev_device *dev) {
  struct udev *udev = udev_device_get_udev(dev);
  struct udev_list_entry *list_entry;
  const char *devnode;
  struct stat stats;
  struct udev_device *dev_check;
  char filename[1024];
  int err = 0;
  for (list_entry = udev_device_get_devlinks_list_entry(dev); list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry))
    link_update(dev, udev_list_entry_get_name(list_entry), 0);
  devnode = udev_device_get_devnode(dev);
  if (devnode == NULL)
    goto out;
  if (stat(devnode, &stats) != 0) {
    udev_log_null(udev, "device node '%s' not found\n", devnode);
    goto out;
  }
  if (stats.st_rdev != udev_device_get_devnum(dev)) {
    udev_log_null(udev, "device node '%s' points to a different device, skip removal\n", devnode);
    err = -1;
    goto out;
  }
  dev_check = udev_device_new_from_syspath(udev, udev_device_get_syspath(dev));
  if (dev_check != NULL) {
    udev_log_null(udev, "keeping device node of existing device'%s'\n", devnode);
    udev_device_unref(dev_check);
    goto out;
  }
  udev_log_null(udev, "removing device node '%s'\n", devnode);
  err = util_unlink_secure(udev, devnode);
  if (err == 0)
    util_delete_path(udev, devnode);
  snprintf(filename, sizeof(filename), "%s/%s/%u:%u", udev_get_dev_path(udev), strcmp(udev_device_get_subsystem(dev), "block") == 0 ? "block" : "char", major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)));
  unlink(filename);
out:
  return err;
}
```