user: Converte this assembly snippet into its equivalent C code:

```asm
<dev_to_string>:
  endbr64
  mov    %edi,%eax
  shr    $0x18,%eax
  cmp    $0x1,%eax
  je     L38
  cmp    $0x4,%eax
  jne    L34
  shr    $0xc,%edi
  lea    D142(%rip),%rax
  and    $0xfff,%edi
  cmp    $0x5,%edi
  je     L23
  lea    D180(%rip),%rax
  cmp    $0xf,%edi
  je     L23
  cmp    $0x2,%edi
  lea    D174(%rip),%rdx
  lea    D111(%rip),%rax
  cmove  %rdx,%rax
  ret
  lea    D40(%rip),%rax
L23:
  ret
  nopw   0x0(%rax,%rax,1)
L34:
  lea    D213(%rip),%rax
  ret
L38:
  shr    $0xc,%edi
  and    $0xfff,%edi
  sub    $0x3,%edi
  cmp    $0x51,%edi
  ja     L7
  lea    D74(%rip),%rdx
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L7:
  lea    D111(%rip),%rax
  ret
  lea    D36(%rip),%rax
  ret
  lea    D64(%rip),%rax
  ret
  lea    D79(%rip),%rax
  ret
  lea    D25(%rip),%rax
  ret
  lea    D182(%rip),%rax
  ret
  lea    D184(%rip),%rax
  ret
  lea    D11(%rip),%rax
  ret
  lea    D42(%rip),%rax
  ret
  lea    D62(%rip),%rax
  ret
  lea    D75(%rip),%rax
  ret
  lea    D58(%rip),%rax
  ret
  lea    D52(%rip),%rax
  ret
  lea    D98(%rip),%rax
  ret
  lea    D53(%rip),%rax
  ret
```

tool_calls: name: read_data
arguments: data_label: D142
type_guessed: string
name: read_data
arguments: data_label: D180
type_guessed: string
name: read_data
arguments: data_label: D174
type_guessed: string
name: read_data
arguments: data_label: D111
type_guessed: string
name: read_data
arguments: data_label: D40
type_guessed: string
name: read_data
arguments: data_label: D213
type_guessed: string
name: read_data
arguments: data_label: D36
type_guessed: string
name: read_data
arguments: data_label: D64
type_guessed: string
name: read_data
arguments: data_label: D79
type_guessed: string
name: read_data
arguments: data_label: D25
type_guessed: string
name: read_data
arguments: data_label: D182
type_guessed: string
name: read_data
arguments: data_label: D184
type_guessed: string
name: read_data
arguments: data_label: D11
type_guessed: string
name: read_data
arguments: data_label: D42
type_guessed: string
name: read_data
arguments: data_label: D62
type_guessed: string
name: read_data
arguments: data_label: D75
type_guessed: string
name: read_data
arguments: data_label: D58
type_guessed: string
name: read_data
arguments: data_label: D52
type_guessed: string
name: read_data
arguments: data_label: D98
type_guessed: string
name: read_data
arguments: data_label: D53
type_guessed: string

tool: D142: Leon2 Interrupt Controller

tool: D180: Leon2 Memory Controller

tool: D174: Leon2 SPARC V8 Processor

tool: D111: Unknown device

tool: D40: LEON3 V8 Processor

tool: D213: Unknown vendor

tool: D36: PROM/SRAM/SDRAM Memory controller with EDAC

tool: D64: LEON3FT V8 Processor

tool: D79: Simple FT SRAM Controller

tool: D25: Generic FT AHB SRAM module

tool: D182: SPI controller

tool: D184: I2C master

tool: D11: SpaceWire Serial Link

tool: D42: General Purpose I/O port

tool: D62: OC CAN AHB interface

tool: D75: Fast 32-bit PCI Bridge

tool: D58: Modular Timer unit

tool: D52: Interrupt Controller

tool: D98: UART

tool: D53: GR Ethernet MAC

assistant: ```c
char *dev_to_string(unsigned int dev) {
  switch (dev >> 24) {
  case 1:
    switch ((dev >> 12) & 0x0fff) {
    case 0x003:
      return "LEON3 V8 Processor";
      break;
    case 0x01D:
      return "GR Ethernet MAC";
      break;
    case 0x014:
      return "Fast 32-bit PCI Bridge";
      break;
    case 0x053:
      return "LEON3FT V8 Processor";
      break;
    case 0x011:
      return "Modular Timer unit";
      break;
    case 0x00D:
      return "Interrupt Controller";
      break;
    case 0x00C:
      return "UART";
      break;
    case 0x019:
      return "OC CAN AHB interface";
      break;
    case 0x01A:
      return "General Purpose I/O port";
      break;
    case 0x054:
      return "PROM/SRAM/SDRAM Memory controller with EDAC";
      break;
    case 0x050:
      return "Generic FT AHB SRAM module";
      break;
    case 0x051:
      return "Simple FT SRAM Controller";
      break;
    case 0x01F:
      return "SpaceWire Serial Link";
      break;
    case 0x02D:
      return "SPI controller";
      break;
    case 0x028:
      return "I2C master";
      break;
    default:
      return "Unknown device";
    }
    break;
  case 4:
    switch ((dev >> 12) & 0x0fff) {
    case 0x002:
      return ("Leon2 SPARC V8 Processor");
      break;
    case 0x00F:
      return ("Leon2 Memory Controller");
      break;
    case 0x005:
      return ("Leon2 Interrupt Controller");
      break;
    default:
      return ("Unknown device");
    }
    break;
  default:
    return ("Unknown vendor");
  }
}
```