user: 请将以下的汇编代码转换成C语言代码:

```asm
<get_mode_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  cmp    $0xae,%eax
  ja     L432
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D100(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D100(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D2(%rip),%rax
  jmp    L333
  lea    D296(%rip),%rax
  jmp    L333
  lea    D353(%rip),%rax
  jmp    L333
  lea    D301(%rip),%rax
  jmp    L333
  lea    D95(%rip),%rax
  jmp    L333
  lea    D107(%rip),%rax
  jmp    L333
  lea    D92(%rip),%rax
  jmp    L333
  lea    D363(%rip),%rax
  jmp    L333
  lea    D272(%rip),%rax
  jmp    L333
  lea    D66(%rip),%rax
  jmp    L333
  lea    D162(%rip),%rax
  jmp    L333
  lea    D130(%rip),%rax
  jmp    L333
  lea    D440(%rip),%rax
  jmp    L333
  lea    D327(%rip),%rax
  jmp    L333
  lea    D94(%rip),%rax
  jmp    L333
  lea    D148(%rip),%rax
  jmp    L333
  lea    D216(%rip),%rax
  jmp    L333
  lea    D413(%rip),%rax
  jmp    L333
  lea    D155(%rip),%rax
  jmp    L333
  lea    D127(%rip),%rax
  jmp    L333
  lea    D457(%rip),%rax
  jmp    L333
  lea    D149(%rip),%rax
  jmp    L333
  lea    D390(%rip),%rax
  jmp    L333
  lea    D396(%rip),%rax
  jmp    L333
  lea    D54(%rip),%rax
  jmp    L333
  lea    D58(%rip),%rax
  jmp    L333
  lea    D402(%rip),%rax
  jmp    L333
  lea    D183(%rip),%rax
  jmp    L333
  lea    D288(%rip),%rax
  jmp    L333
  lea    D151(%rip),%rax
  jmp    L333
  lea    D311(%rip),%rax
  jmp    L333
  lea    D193(%rip),%rax
  jmp    L333
  lea    D244(%rip),%rax
  jmp    L333
  lea    D189(%rip),%rax
  jmp    L333
  lea    D13(%rip),%rax
  jmp    L333
  lea    D432(%rip),%rax
  jmp    L333
  lea    D290(%rip),%rax
  jmp    L333
  lea    D3(%rip),%rax
  jmp    L333
  lea    D230(%rip),%rax
  jmp    L333
  lea    D33(%rip),%rax
  jmp    L333
  lea    D260(%rip),%rax
  jmp    L333
  lea    D382(%rip),%rax
  jmp    L333
  lea    D120(%rip),%rax
  jmp    L333
L432:
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D312(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D240(%rip),%rax
L333:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D2
type_guessed: string
name: parse_data
arguments: data_tag: D296
type_guessed: string
name: parse_data
arguments: data_tag: D353
type_guessed: string
name: parse_data
arguments: data_tag: D301
type_guessed: string
name: parse_data
arguments: data_tag: D95
type_guessed: string
name: parse_data
arguments: data_tag: D107
type_guessed: string
name: parse_data
arguments: data_tag: D92
type_guessed: string
name: parse_data
arguments: data_tag: D363
type_guessed: string
name: parse_data
arguments: data_tag: D272
type_guessed: string
name: parse_data
arguments: data_tag: D66
type_guessed: string
name: parse_data
arguments: data_tag: D162
type_guessed: string
name: parse_data
arguments: data_tag: D130
type_guessed: string
name: parse_data
arguments: data_tag: D440
type_guessed: string
name: parse_data
arguments: data_tag: D327
type_guessed: string
name: parse_data
arguments: data_tag: D94
type_guessed: string
name: parse_data
arguments: data_tag: D148
type_guessed: string
name: parse_data
arguments: data_tag: D216
type_guessed: string
name: parse_data
arguments: data_tag: D413
type_guessed: string
name: parse_data
arguments: data_tag: D155
type_guessed: string
name: parse_data
arguments: data_tag: D127
type_guessed: string
name: parse_data
arguments: data_tag: D457
type_guessed: string
name: parse_data
arguments: data_tag: D149
type_guessed: string
name: parse_data
arguments: data_tag: D390
type_guessed: string
name: parse_data
arguments: data_tag: D396
type_guessed: string
name: parse_data
arguments: data_tag: D54
type_guessed: string
name: parse_data
arguments: data_tag: D58
type_guessed: string
name: parse_data
arguments: data_tag: D402
type_guessed: string
name: parse_data
arguments: data_tag: D183
type_guessed: string
name: parse_data
arguments: data_tag: D288
type_guessed: string
name: parse_data
arguments: data_tag: D151
type_guessed: string
name: parse_data
arguments: data_tag: D311
type_guessed: string
name: parse_data
arguments: data_tag: D193
type_guessed: string
name: parse_data
arguments: data_tag: D244
type_guessed: string
name: parse_data
arguments: data_tag: D189
type_guessed: string
name: parse_data
arguments: data_tag: D13
type_guessed: string
name: parse_data
arguments: data_tag: D432
type_guessed: string
name: parse_data
arguments: data_tag: D290
type_guessed: string
name: parse_data
arguments: data_tag: D3
type_guessed: string
name: parse_data
arguments: data_tag: D230
type_guessed: string
name: parse_data
arguments: data_tag: D33
type_guessed: string
name: parse_data
arguments: data_tag: D260
type_guessed: string
name: parse_data
arguments: data_tag: D382
type_guessed: string
name: parse_data
arguments: data_tag: D120
type_guessed: string
name: parse_data
arguments: data_tag: D312
type_guessed: string
name: parse_data
arguments: data_tag: D240
type_guessed: string

tool: D2: Show current Data

tool: D296: Show freeze frame

tool: D353: Read DTCs

tool: D301: Clear DTCs

tool: D95: Mode Test Results (Non-CAN)

tool: D107: Mode Test Results (CAN)

tool: D92: Read Pending DTCs

tool: D363: Control Operations

tool: D272: Vehicle Information

tool: D66: Read Permanent DTCs

tool: D162: Diagnostic Control

tool: D130: ECU Reset

tool: D440: UDS Clear DTCs

tool: D327: UDS Read DTCs

tool: D94: Read DID by ID (GM)

tool: D148: Restore Normal Commnications

tool: D216: Read DATA By ID

tool: D413: Read Memory By Address

tool: D155: Read Scalling Data by ID

tool: D127: Security Access

tool: D457: Communication Control

tool: D149: Read DATA By ID Periodically

tool: D390: Define DATA By ID

tool: D396: Write DATA By ID

tool: D54: Input/Output Control By ID

tool: D58: Routine Control

tool: D402: Request Download

tool: D183: Request Upload

tool: D288: Transfer DATA

tool: D151: Request Transfer Exit

tool: D311: Request Transfer File

tool: D193: Write Memory By Address

tool: D244: Tester Present

tool: D189: Access Timing

tool: D13: Secured DATA Transfer

tool: D432: Control DTC Settings

tool: D290: Response On Event

tool: D3: Link Control

tool: D230: Programmed State (GM)

tool: D33: Programming Mode (GM)

tool: D260: Read Diagnostic Information (GM)

tool: D382: Read DATA By ID (GM)

tool: D120: Device Control (GM)

tool: D312: Unknown mode/sid (%02X)


tool: 

assistant: ```c
char *get_mode_str(struct canfd_frame frame) {
  switch (frame.data[1]) {
  case 0x01:
    return "Show current Data";
    break;
  case 0x02:
    return "Show freeze frame";
    break;
  case 0x03:
    return "Read DTCs";
    break;
  case 0x04:
    return "Clear DTCs";
    break;
  case 0x05:
    return "Mode Test Results (Non-CAN)";
    break;
  case 0x06:
    return "Mode Test Results (CAN)";
    break;
  case 0x07:
    return "Read Pending DTCs";
    break;
  case 0x08:
    return "Control Operations";
    break;
  case 0x09:
    return "Vehicle Information";
    break;
  case 0x0A:
    return "Read Permanent DTCs";
    break;
  case 0x10:
    return "Diagnostic Control";
    break;
  case 0x11:
    return "ECU Reset";
    break;
  case 0x14:
    return "UDS Clear DTCs";
    break;
  case 0x19:
    return "UDS Read DTCs";
    break;
  case 0x1A:
    return "Read DID by ID (GM)";
    break;
  case 0x20:
    return "Restore Normal Commnications";
    break;
  case 0x22:
    return "Read DATA By ID";
    break;
  case 0x23:
    return "Read Memory By Address";
    break;
  case 0x24:
    return "Read Scalling Data by ID";
    break;
  case 0x27:
    return "Security Access";
    break;
  case 0x28:
    return "Communication Control";
    break;
  case 0x2A:
    return "Read DATA By ID Periodically";
    break;
  case 0x2C:
    return "Define DATA By ID";
    break;
  case 0x2E:
    return "Write DATA By ID";
    break;
  case 0x2F:
    return "Input/Output Control By ID";
    break;
  case 0x31:
    return "Routine Control";
    break;
  case 0x34:
    return "Request Download";
    break;
  case 0x35:
    return "Request Upload";
    break;
  case 0x36:
    return "Transfer DATA";
    break;
  case 0x37:
    return "Request Transfer Exit";
    break;
  case 0x38:
    return "Request Transfer File";
    break;
  case 0x3D:
    return "Write Memory By Address";
    break;
  case 0x3E:
    return "Tester Present";
    break;
  case 0x83:
    return "Access Timing";
    break;
  case 0x84:
    return "Secured DATA Transfer";
    break;
  case 0x85:
    return "Control DTC Settings";
    break;
  case 0x86:
    return "Response On Event";
    break;
  case 0x87:
    return "Link Control";
    break;
  case 0xA2:
    return "Programmed State (GM)";
    break;
  case 0xA5:
    return "Programming Mode (GM)";
    break;
  case 0xA9:
    return "Read Diagnostic Information (GM)";
    break;
  case 0xAA:
    return "Read DATA By ID (GM)";
    break;
  case 0xAE:
    return "Device Control (GM)";
    break;
  default:
    printf("Unknown mode/sid (%02X)\n", frame.data[1]);
    return "";
  }
}
```