user: Please show me the C implementation that matches the assembly code listed below:

```asm
<get_minor_device_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  cmpl   $0x3f,-0x4(%rbp)
  ja     L109
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D2(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D2(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D272(%rip),%rax
  jmp    L732
  cmpl   $0x6,-0x8(%rbp)
  ja     L40
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D254(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D254(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D441(%rip),%rax
  jmp    L732
  lea    D124(%rip),%rax
  jmp    L732
  lea    D256(%rip),%rax
  jmp    L732
  lea    D248(%rip),%rax
  jmp    L732
  lea    D26(%rip),%rax
  jmp    L732
  lea    D453(%rip),%rax
  jmp    L732
  lea    D297(%rip),%rax
  jmp    L732
  cmpl   $0x6,-0x8(%rbp)
  ja     L778
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D923(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D923(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D441(%rip),%rax
  jmp    L732
  lea    D135(%rip),%rax
  jmp    L732
  lea    D404(%rip),%rax
  jmp    L732
  lea    D800(%rip),%rax
  jmp    L732
  lea    D630(%rip),%rax
  jmp    L732
  lea    D670(%rip),%rax
  jmp    L732
  lea    D8(%rip),%rax
  jmp    L732
  cmpl   $0x0,-0x8(%rbp)
  jne    L640
  lea    D441(%rip),%rax
  jmp    L732
L640:
  mov    -0x8(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  cmp    $0x7,%eax
  ja     L731
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D418(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D418(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D376(%rip),%rax
  jmp    L732
  lea    D303(%rip),%rax
  jmp    L732
  lea    D667(%rip),%rax
  jmp    L732
  lea    D556(%rip),%rax
  jmp    L732
  lea    D894(%rip),%rax
  jmp    L732
  lea    D18(%rip),%rax
  jmp    L732
  lea    D336(%rip),%rax
  jmp    L732
  lea    D799(%rip),%rax
  jmp    L732
  cmpl   $0x12,-0x8(%rbp)
  ja     L41
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D756(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D756(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D441(%rip),%rax
  jmp    L732
  lea    D1041(%rip),%rax
  jmp    L732
  lea    D1032(%rip),%rax
  jmp    L732
  lea    D671(%rip),%rax
  jmp    L732
  lea    D1055(%rip),%rax
  jmp    L732
  lea    D777(%rip),%rax
  jmp    L732
  lea    D901(%rip),%rax
  jmp    L732
  lea    D624(%rip),%rax
  jmp    L732
  lea    D540(%rip),%rax
  jmp    L732
  lea    D552(%rip),%rax
  jmp    L732
  lea    D636(%rip),%rax
  jmp    L732
  lea    D890(%rip),%rax
  jmp    L732
  lea    D660(%rip),%rax
  jmp    L732
  lea    D292(%rip),%rax
  jmp    L732
  lea    D642(%rip),%rax
  jmp    L732
  lea    D966(%rip),%rax
  jmp    L732
  lea    D403(%rip),%rax
  jmp    L732
  movb   $0x0,D883(%rip)
  mov    -0x8(%rbp),%eax
  and    $0x30,%eax
  cmp    $0x30,%eax
  je     L520
  cmp    $0x30,%eax
  jg     L327
  cmp    $0x10,%eax
  je     L49
  cmp    $0x20,%eax
  je     L98
  jmp    L327
L49:
  mov    $0x30,%edx
  lea    D183(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncpy@plt>
  jmp    L327
L98:
  mov    $0x30,%edx
  lea    D664(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncpy@plt>
  jmp    L327
L520:
  mov    $0x30,%edx
  lea    D843(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncpy@plt>
  nop
L327:
  mov    -0x8(%rbp),%eax
  and    $0xf,%eax
  test   %eax,%eax
  je     L165
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L165
  lea    D123(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L165:
  mov    -0x8(%rbp),%eax
  and    $0xf,%eax
  cmp    $0x6,%eax
  ja     L265
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D971(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D971(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D866(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D583(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D598(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D879(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D605(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D166(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
L265:
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  lea    D469(%rip),%rax
  mov    %rax,%rsi
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L21
  nop
L21:
  lea    D883(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L437
  lea    D883(%rip),%rax
  jmp    L732
L437:
  mov    -0x8(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L928
  lea    D416(%rip),%rax
  jmp    L732
L928:
  mov    -0x8(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L333
  lea    D567(%rip),%rax
  jmp    L732
L333:
  mov    -0x8(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L88
  lea    D426(%rip),%rax
  jmp    L732
L88:
  mov    -0x8(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L644
  lea    D213(%rip),%rax
  jmp    L732
  cmpl   $0x5,-0x8(%rbp)
  ja     L736
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D732(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D732(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D1008(%rip),%rax
  jmp    L732
  lea    D594(%rip),%rax
  jmp    L732
  lea    D874(%rip),%rax
  jmp    L732
  lea    D640(%rip),%rax
  jmp    L732
  lea    D784(%rip),%rax
  jmp    L732
  cmpl   $0x5,-0x8(%rbp)
  ja     L191
  mov    -0x8(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D509(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D509(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D250(%rip),%rax
  jmp    L732
  lea    D746(%rip),%rax
  jmp    L732
  lea    D896(%rip),%rax
  jmp    L732
  lea    D235(%rip),%rax
  jmp    L732
  lea    D304(%rip),%rax
  jmp    L732
  lea    D272(%rip),%rax
  jmp    L732
L40:
  nop
  jmp    L109
L778:
  nop
  jmp    L109
L731:
  nop
  jmp    L109
L41:
  nop
  jmp    L109
L644:
  nop
  jmp    L109
L736:
  nop
  jmp    L109
L191:
  nop
L109:
  lea    D833(%rip),%rax
L732:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D272
datatype: string
name: read_data
arguments: data_tag: D441
datatype: string
name: read_data
arguments: data_tag: D124
datatype: string
name: read_data
arguments: data_tag: D256
datatype: string
name: read_data
arguments: data_tag: D248
datatype: string
name: read_data
arguments: data_tag: D26
datatype: string
name: read_data
arguments: data_tag: D453
datatype: string
name: read_data
arguments: data_tag: D297
datatype: string
name: read_data
arguments: data_tag: D135
datatype: string
name: read_data
arguments: data_tag: D404
datatype: string
name: read_data
arguments: data_tag: D800
datatype: string
name: read_data
arguments: data_tag: D630
datatype: string
name: read_data
arguments: data_tag: D670
datatype: string
name: read_data
arguments: data_tag: D8
datatype: string
name: read_data
arguments: data_tag: D376
datatype: string
name: read_data
arguments: data_tag: D303
datatype: string
name: read_data
arguments: data_tag: D667
datatype: string
name: read_data
arguments: data_tag: D556
datatype: string
name: read_data
arguments: data_tag: D894
datatype: string
name: read_data
arguments: data_tag: D18
datatype: string
name: read_data
arguments: data_tag: D336
datatype: string
name: read_data
arguments: data_tag: D799
datatype: string
name: read_data
arguments: data_tag: D1041
datatype: string
name: read_data
arguments: data_tag: D1032
datatype: string
name: read_data
arguments: data_tag: D671
datatype: string
name: read_data
arguments: data_tag: D1055
datatype: string
name: read_data
arguments: data_tag: D777
datatype: string
name: read_data
arguments: data_tag: D901
datatype: string
name: read_data
arguments: data_tag: D624
datatype: string
name: read_data
arguments: data_tag: D540
datatype: string
name: read_data
arguments: data_tag: D552
datatype: string
name: read_data
arguments: data_tag: D636
datatype: string
name: read_data
arguments: data_tag: D890
datatype: string
name: read_data
arguments: data_tag: D660
datatype: string
name: read_data
arguments: data_tag: D292
datatype: string
name: read_data
arguments: data_tag: D642
datatype: string
name: read_data
arguments: data_tag: D966
datatype: string
name: read_data
arguments: data_tag: D403
datatype: string
name: read_data
arguments: data_tag: D183
datatype: string
name: read_data
arguments: data_tag: D664
datatype: string
name: read_data
arguments: data_tag: D843
datatype: string
name: read_data
arguments: data_tag: D123
datatype: string
name: read_data
arguments: data_tag: D866
datatype: string
name: read_data
arguments: data_tag: D583
datatype: string
name: read_data
arguments: data_tag: D598
datatype: string
name: read_data
arguments: data_tag: D879
datatype: string
name: read_data
arguments: data_tag: D605
datatype: string
name: read_data
arguments: data_tag: D166
datatype: string
name: read_data
arguments: data_tag: D469
datatype: string
name: read_data
arguments: data_tag: D416
datatype: string
name: read_data
arguments: data_tag: D567
datatype: string
name: read_data
arguments: data_tag: D426
datatype: string
name: read_data
arguments: data_tag: D213
datatype: string
name: read_data
arguments: data_tag: D1008
datatype: string
name: read_data
arguments: data_tag: D594
datatype: string
name: read_data
arguments: data_tag: D874
datatype: string
name: read_data
arguments: data_tag: D640
datatype: string
name: read_data
arguments: data_tag: D784
datatype: string
name: read_data
arguments: data_tag: D250
datatype: string
name: read_data
arguments: data_tag: D746
datatype: string
name: read_data
arguments: data_tag: D896
datatype: string
name: read_data
arguments: data_tag: D235
datatype: string
name: read_data
arguments: data_tag: D304
datatype: string
name: read_data
arguments: data_tag: D833
datatype: string

tool: 

tool: D441: Uncategorized

tool: D124: Desktop workstation

tool: D256: Server

tool: D248: Laptop

tool: D26: Handheld

tool: D453: Palm

tool: D297: Wearable

tool: D135: Cellular

tool: D404: Cordless

tool: D800: Smart phone

tool: D630: Wired modem / voice gateway

tool: D670: Common ISDN Access

tool: D8: Sim Card Reader

tool: D376: Fully available

tool: D303: 1-17% utilized

tool: D667: 17-33% utilized

tool: D556: 33-50% utilized

tool: D894: 50-67% utilized

tool: D18: 67-83% utilized

tool: D336: 83-99% utilized

tool: D799: No service available

tool: D1041: Headset profile

tool: D1032: Hands-free

tool: D671: Microphone

tool: D1055: Loudspeaker

tool: D777: Headphones

tool: D901: Portable Audio

tool: D624: Car Audio

tool: D540: Set-top box

tool: D552: HiFi Audio Device

tool: D636: VCR

tool: D890: Video Camera

tool: D660: Camcorder

tool: D292: Video Monitor

tool: D642: Video Display and Loudspeaker

tool: D966: Video Conferencing

tool: D403: Gaming/Toy

tool: D183: Keyboard

tool: D664: Pointing device

tool: D843: Combo keyboard/pointing device

tool: D123: /

tool: D866: Joystick

tool: D583: Gamepad

tool: D598: Remote control

tool: D879: Sensing device

tool: D605: Digitizer tablet

tool: D166: Card reader

tool: D469: (reserved)

tool: D416: Display

tool: D567: Camera

tool: D426: Scanner

tool: D213: Printer

tool: D1008: Wrist Watch

tool: D594: Pager

tool: D874: Jacket

tool: D640: Helmet

tool: D784: Glasses

tool: D250: Robot

tool: D746: Vehicle

tool: D896: Doll / Action Figure

tool: D235: Controller

tool: D304: Game

tool: D833: Unknown

assistant: ```c
char *get_minor_device_name(int major, int minor) {
  switch (major) {
  case 0:
    return "";
  case 1:
    switch (minor) {
    case 0:
      return "Uncategorized";
    case 1:
      return "Desktop workstation";
    case 2:
      return "Server";
    case 3:
      return "Laptop";
    case 4:
      return "Handheld";
    case 5:
      return "Palm";
    case 6:
      return "Wearable";
    }
    break;
  case 2:
    switch (minor) {
    case 0:
      return "Uncategorized";
    case 1:
      return "Cellular";
    case 2:
      return "Cordless";
    case 3:
      return "Smart phone";
    case 4:
      return "Wired modem / voice gateway";
    case 5:
      return "Common ISDN Access";
    case 6:
      return "Sim Card Reader";
    }
    break;
  case 3:
    if (minor == 0)
      return "Uncategorized";
    switch (minor / 8) {
    case 0:
      return "Fully available";
    case 1:
      return "1-17% utilized";
    case 2:
      return "17-33% utilized";
    case 3:
      return "33-50% utilized";
    case 4:
      return "50-67% utilized";
    case 5:
      return "67-83% utilized";
    case 6:
      return "83-99% utilized";
    case 7:
      return "No service available";
    }
    break;
  case 4:
    switch (minor) {
    case 0:
      return "Uncategorized";
    case 1:
      return "Headset profile";
    case 2:
      return "Hands-free";
    case 4:
      return "Microphone";
    case 5:
      return "Loudspeaker";
    case 6:
      return "Headphones";
    case 7:
      return "Portable Audio";
    case 8:
      return "Car Audio";
    case 9:
      return "Set-top box";
    case 10:
      return "HiFi Audio Device";
    case 11:
      return "VCR";
    case 12:
      return "Video Camera";
    case 13:
      return "Camcorder";
    case 14:
      return "Video Monitor";
    case 15:
      return "Video Display and Loudspeaker";
    case 16:
      return "Video Conferencing";
    case 18:
      return "Gaming/Toy";
    }
    break;
  case 5: {
    static char cls_str[48];
    cls_str[0] = '\0';
    switch (minor & 48) {
    case 16:
      strncpy(cls_str, "Keyboard", sizeof(cls_str));
      break;
    case 32:
      strncpy(cls_str, "Pointing device", sizeof(cls_str));
      break;
    case 48:
      strncpy(cls_str, "Combo keyboard/pointing device", sizeof(cls_str));
      break;
    }
    if ((minor & 15) && (strlen(cls_str) > 0))
      strcat(cls_str, "/");
    switch (minor & 15) {
    case 0:
      break;
    case 1:
      strncat(cls_str, "Joystick", sizeof(cls_str) - strlen(cls_str));
      break;
    case 2:
      strncat(cls_str, "Gamepad", sizeof(cls_str) - strlen(cls_str));
      break;
    case 3:
      strncat(cls_str, "Remote control", sizeof(cls_str) - strlen(cls_str));
      break;
    case 4:
      strncat(cls_str, "Sensing device", sizeof(cls_str) - strlen(cls_str));
      break;
    case 5:
      strncat(cls_str, "Digitizer tablet", sizeof(cls_str) - strlen(cls_str));
      break;
    case 6:
      strncat(cls_str, "Card reader", sizeof(cls_str) - strlen(cls_str));
      break;
    default:
      strncat(cls_str, "(reserved)", sizeof(cls_str) - strlen(cls_str));
      break;
    }
    if (strlen(cls_str) > 0)
      return cls_str;
  }
  case 6:
    if (minor & 4)
      return "Display";
    if (minor & 8)
      return "Camera";
    if (minor & 16)
      return "Scanner";
    if (minor & 32)
      return "Printer";
    break;
  case 7:
    switch (minor) {
    case 1:
      return "Wrist Watch";
    case 2:
      return "Pager";
    case 3:
      return "Jacket";
    case 4:
      return "Helmet";
    case 5:
      return "Glasses";
    }
    break;
  case 8:
    switch (minor) {
    case 1:
      return "Robot";
    case 2:
      return "Vehicle";
    case 3:
      return "Doll / Action Figure";
    case 4:
      return "Controller";
    case 5:
      return "Game";
    }
    break;
  case 63:
    return "";
  }
  return "Unknown";
}
```