user: Translate the below assembly code into C programming language:

```asm
<udev_node_add>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x428,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  call   <udev_device_get_udev@plt>
  mov    %rbx,%rdi
  mov    %rax,%r12
  call   <udev_device_get_devnum@plt>
  mov    %eax,%edi
  call   <minor@plt>
  mov    %rbx,%rdi
  mov    %eax,0xc(%rsp)
  call   <udev_device_get_devnum@plt>
  mov    %eax,%edi
  call   <major@plt>
  mov    %rbx,%rdi
  mov    %eax,%r15d
  call   <udev_device_get_devnode@plt>
  push   %rbp
  mov    %r13d,%r9d
  mov    %r15d,%ecx
  push   %r14
  mov    0x1c(%rsp),%r8d
  mov    %eax,%edx
  lea    D32(%rip),%rsi
  mov    %r12,%rdi
  call   <udev_log_null@plt>
  mov    %r14d,%ecx
  xor    %esi,%esi
  mov    %ebp,%r8d
  mov    %r13d,%edx
  mov    %rbx,%rdi
  call   <udev_node_mknod@plt>
  pop    %rcx
  pop    %rsi
  test   %rax,%rax
  jne    L79
  mov    %rbx,%rdi
  lea    D30(%rip),%rbp
  lea    0x10(%rsp),%r14
  call   <udev_device_get_devnum@plt>
  mov    %eax,%edi
  call   <minor@plt>
  mov    %rbx,%rdi
  mov    %eax,%r15d
  call   <udev_device_get_devnum@plt>
  mov    %eax,%edi
  call   <major@plt>
  mov    %rbx,%rdi
  mov    %eax,%r13d
  call   <udev_device_get_subsystem@plt>
  mov    %rbp,%rsi
  mov    %eax,%edi
  call   <strcmp@plt>
  mov    %r12,%rdi
  test   %rax,%rax
  lea    D28(%rip),%rax
  cmovne %rax,%rbp
  call   <udev_get_dev_path@plt>
  sub    $0x8,%rsp
  mov    %r13d,%r9d
  mov    %r14,%rdi
  push   %r15
  mov    %rbp,%r8
  mov    %rax,%rcx
  lea    D34(%rip),%rdx
  mov    $0x400,%esi
  call   <snprintf@plt>
  mov    %rbx,%rdi
  call   <udev_device_get_devnode@plt>
  mov    %r14,%rdx
  mov    %r12,%rdi
  mov    %eax,%esi
  call   <node_symlink@plt>
  mov    %rbx,%rdi
  call   <udev_device_get_devlinks_list_entry@plt>
  mov    %rax,%rbp
  pop    %rax
  pop    %rdx
  test   %rbp,%rbp
  jne    L66
  jmp    L30
  nopl   0x0(%rax)
L73:
  call   <udev_list_entry_get_name@plt>
  mov    %rbx,%rdi
  mov    %rax,%r13
  call   <udev_device_get_devnode@plt>
  mov    %r13,%rdx
  mov    %r12,%rdi
  mov    %eax,%esi
  call   <node_symlink@plt>
  mov    %rbp,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L30
L66:
  mov    %rbp,%rdi
  call   <udev_list_entry_get_num@plt>
  mov    %rbp,%rdi
  test   %rax,%rax
  jne    L73
  call   <udev_list_entry_get_name@plt>
  mov    $0x1,%edx
  mov    %rbx,%rdi
  mov    %rax,%rsi
  call   <link_update@plt>
  mov    %rbp,%rdi
  call   <udev_list_entry_get_next@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L66
L30:
  xor    %eax,%eax
L72:
  mov    0x418(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1
  add    $0x428,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L79:
  mov    $0xffffffff,%eax
  jmp    L72
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D32
datatype: string
name: read_data
arguments: data_tag: D30
datatype: string
name: read_data
arguments: data_tag: D28
datatype: string
name: read_data
arguments: data_tag: D34
datatype: string

tool: D32: creating device node '%s', devnum=%d:%d, mode=%#o, uid=%d, gid=%d


tool: D30: block

tool: D28: char

tool: D34: %s/%s/%u:%u

assistant: ```c
int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) {
  struct udev *udev = udev_device_get_udev(dev);
  char filename[1024];
  struct udev_list_entry *list_entry;
  int err = 0;
  udev_log_null(udev, "creating device node '%s', devnum=%d:%d, mode=%#o, uid=%d, gid=%d\n", udev_device_get_devnode(dev), major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)), mode, uid, gid);
  if (udev_node_mknod(dev, NULL, mode, uid, gid) != 0) {
    err = -1;
    goto exit;
  }
  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)));
  node_symlink(udev, udev_device_get_devnode(dev), filename);
  for (list_entry = udev_device_get_devlinks_list_entry(dev); list_entry != NULL; list_entry = udev_list_entry_get_next(list_entry)) {
    if (udev_list_entry_get_num(list_entry))
      node_symlink(udev, udev_device_get_devnode(dev), udev_list_entry_get_name(list_entry));
    else
      link_update(dev, udev_list_entry_get_name(list_entry), 1);
  }
exit:
  return err;
}
```