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

```asm
<handle_scsi>:
  endbr64
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x8,%rsp
  call   <udev_device_get_devtype@plt>
  test   %rax,%rax
  je     L34
  mov    %rax,%rdi
  lea    D35(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L18
L34:
  add    $0x8,%rsp
  mov    %rbp,%r12
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L18:
  lea    D46(%rip),%rsi
  mov    %rbp,%rdi
  call   <udev_device_get_sysattr_value@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L40
  mov    %rbp,%rdi
  lea    D6(%rip),%rsi
  call   <skip_subsystem@plt>
  mov    %r14,%rdx
  mov    %r13,%rdi
  lea    D43(%rip),%rsi
  mov    %rax,%r12
  call   <path_prepend@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L40:
  mov    %rbp,%rdi
  call   <udev_device_get_syspath@plt>
  lea    D41(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strstr@plt>
  test   %rax,%rax
  jne    L39
  lea    D68(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L23
  lea    D45(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  test   %rax,%rax
  je     L29
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1160 <handle_scsi_iscsi@plt>
  nopl   (%rax)
L39:
  add    $0x8,%rsp
  mov    %r13,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1140 <handle_scsi_fibre_channel@plt>
  xchg   %ax,%ax
L29:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1130 <handle_scsi_default@plt>
L23:
  add    $0x8,%rsp
  mov    %r13,%rsi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1110 <handle_scsi_sas@plt>
```

tool_calls: name: unpack_data
arguments: tag: D35
type: string
name: unpack_data
arguments: tag: D46
type: string
name: unpack_data
arguments: tag: D6
type: string
name: unpack_data
arguments: tag: D43
type: string
name: unpack_data
arguments: tag: D41
type: string
name: unpack_data
arguments: tag: D68
type: string
name: unpack_data
arguments: tag: D45
type: string

tool: D35: scsi_device

tool: D46: ieee1394_id

tool: D6: scsi

tool: D43: ieee1394-0x%s

tool: D41: /rport-

tool: D68: /end_device-

tool: D45: /session

assistant: ```c
struct udev_device *handle_scsi(struct udev_device *parent, char **path) {
  const char *devtype;
  const char *name;
  const char *id;
  devtype = udev_device_get_devtype(parent);
  if (devtype == NULL || strcmp(devtype, "scsi_device") != 0)
    return parent;
  id = udev_device_get_sysattr_value(parent, "ieee1394_id");
  if (id != NULL) {
    parent = skip_subsystem(parent, "scsi");
    path_prepend(path, "ieee1394-0x%s", id);
    goto out;
  }
  name = udev_device_get_syspath(parent);
  if (strstr(name, "/rport-") != NULL) {
    parent = handle_scsi_fibre_channel(parent, path);
    goto out;
  }
  if (strstr(name, "/end_device-") != NULL) {
    parent = handle_scsi_sas(parent, path);
    goto out;
  }
  if (strstr(name, "/session") != NULL) {
    parent = handle_scsi_iscsi(parent, path);
    goto out;
  }
  parent = handle_scsi_default(parent, path);
out:
  return parent;
}
```