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

```asm
<gaisler_device_str>:
  endbr64
  cmp    $0x1f,%edi
  jg     L16
  cmp    $0x2,%edi
  jle    L40
  sub    $0x3,%edi
  cmp    $0x1c,%edi
  ja     L40
  lea    D64(%rip),%rdx
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L40:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L16:
  lea    D172(%rip),%rax
  cmp    $0xffe,%edi
  je     L44
  cmp    $0xfff,%edi
  jne    L49
  lea    D138(%rip),%rax
L44:
  ret
L49:
  cmp    $0xffd,%edi
  mov    $0x0,%edx
  lea    D144(%rip),%rax
  cmovne %rdx,%rax
  ret
  xchg   %ax,%ax
  lea    D226(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D9(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D6(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D51(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D49(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D223(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D55(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D206(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D163(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D110(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D126(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D128(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D153(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D131(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D182(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D70(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D148(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D123(%rip),%rax
  ret
  nopl   0x0(%rax,%rax,1)
  lea    D52(%rip),%rax
  ret
```

tool_calls: name: parse_data
arguments: label: D172
type_infered: string
name: parse_data
arguments: label: D138
type_infered: string
name: parse_data
arguments: label: D144
type_infered: string
name: parse_data
arguments: label: D226
type_infered: string
name: parse_data
arguments: label: D9
type_infered: string
name: parse_data
arguments: label: D6
type_infered: string
name: parse_data
arguments: label: D51
type_infered: string
name: parse_data
arguments: label: D49
type_infered: string
name: parse_data
arguments: label: D223
type_infered: string
name: parse_data
arguments: label: D55
type_infered: string
name: parse_data
arguments: label: D206
type_infered: string
name: parse_data
arguments: label: D163
type_infered: string
name: parse_data
arguments: label: D110
type_infered: string
name: parse_data
arguments: label: D126
type_infered: string
name: parse_data
arguments: label: D128
type_infered: string
name: parse_data
arguments: label: D153
type_infered: string
name: parse_data
arguments: label: D131
type_infered: string
name: parse_data
arguments: label: D182
type_infered: string
name: parse_data
arguments: label: D70
type_infered: string
name: parse_data
arguments: label: D148
type_infered: string
name: parse_data
arguments: label: D123
type_infered: string
name: parse_data
arguments: label: D52
type_infered: string

tool: D172: GAISLER_L2C

tool: D138: GAISLER_PLUGPLAY

tool: D144: GAISLER_L2TIME

tool: D226: GAISLER_SPACEWIRE

tool: D9: GAISLER_PIOPORT

tool: D6: GAISLER_ETHDSU

tool: D51: GAISLER_AHBTRACE

tool: D49: GAISLER_PCITRACE

tool: D223: GAISLER_PCIFBRG

tool: D55: GAISLER_PCISBRG

tool: D206: GAISLER_PCITRG

tool: D163: GAISLER_GPTIMER

tool: D110: GAISLER_AHBRAM

tool: D126: GAISLER_IRQMP

tool: D128: GAISLER_APBUART

tool: D153: GAISLER_SDCTRL

tool: D131: GAISLER_SRCTRL

tool: D182: GAISLER_AHBUART

tool: D70: GAISLER_APBMST

tool: D148: GAISLER_ETHAHB

tool: D123: GAISLER_LEON3

tool: D52: GAISLER_LEON3DSU

assistant: ```c
extern char *gaisler_device_str(int id) {
  switch (id) {
  case 0x003:
    return "GAISLER_LEON3";
  case 0x004:
    return "GAISLER_LEON3DSU";
  case 0x005:
    return "GAISLER_ETHAHB";
  case 0x006:
    return "GAISLER_APBMST";
  case 0x007:
    return "GAISLER_AHBUART";
  case 0x008:
    return "GAISLER_SRCTRL";
  case 0x009:
    return "GAISLER_SDCTRL";
  case 0x00c:
    return "GAISLER_APBUART";
  case 0x00d:
    return "GAISLER_IRQMP";
  case 0x00e:
    return "GAISLER_AHBRAM";
  case 0x011:
    return "GAISLER_GPTIMER";
  case 0x012:
    return "GAISLER_PCITRG";
  case 0x013:
    return "GAISLER_PCISBRG";
  case 0x014:
    return "GAISLER_PCIFBRG";
  case 0x015:
    return "GAISLER_PCITRACE";
  case 0x017:
    return "GAISLER_AHBTRACE";
  case 0x018:
    return "GAISLER_ETHDSU";
  case 0x01A:
    return "GAISLER_PIOPORT";
  case 0x01f:
    return "GAISLER_SPACEWIRE";
  case 0xffd:
    return "GAISLER_L2TIME";
  case 0xffe:
    return "GAISLER_L2C";
  case 0xfff:
    return "GAISLER_PLUGPLAY";
  default:
    break;
  }
  return 0;
}
```