user: 请从给定的汇编指令推导出C源代码：

```asm
<getRegArg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    D59(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L96
  mov    -0x18(%rbp),%rax
  lea    D106(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L22
L96:
  mov    $0x1c,%eax
  jmp    L196
L22:
  mov    -0x18(%rbp),%rax
  lea    D82(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L153
  mov    -0x18(%rbp),%rax
  lea    D51(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L16
L153:
  mov    $0x1d,%eax
  jmp    L196
L16:
  mov    -0x18(%rbp),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L21
  mov    -0x18(%rbp),%rax
  lea    D47(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L133
L21:
  mov    $0x1e,%eax
  jmp    L196
L133:
  mov    -0x18(%rbp),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L90
  mov    -0x18(%rbp),%rax
  lea    D45(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L55
L90:
  mov    $0x1f,%eax
  jmp    L196
L55:
  mov    -0x18(%rbp),%rax
  lea    D117(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L213
  mov    -0x18(%rbp),%rax
  lea    D48(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L17
L213:
  mov    $0x20,%eax
  jmp    L196
L17:
  mov    -0x18(%rbp),%rax
  lea    D42(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L73
  mov    -0x18(%rbp),%rax
  lea    D83(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L118
L73:
  mov    $0x21,%eax
  jmp    L196
L118:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x52,%eax
  cmp    $0x22,%eax
  seta   %dl
  test   %dl,%dl
  jne    L68
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  movabs $0x400000004,%rdx
  and    %rax,%rdx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L222
  movabs $0x200000002,%rdx
  and    %rax,%rdx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L220
  movabs $0x100000001,%rdx
  and    %rdx,%rax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L68
  mov    -0x4(%rbp),%eax
  jmp    L196
L220:
  mov    -0x4(%rbp),%eax
  add    $0x8,%eax
  jmp    L196
L222:
  mov    -0x4(%rbp),%eax
  add    $0x18,%eax
  jmp    L196
L68:
  mov    $0xffffffff,%eax
L196:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D59
data_type: string
name: extract_symbolic_data
arguments: label: D106
data_type: string
name: extract_symbolic_data
arguments: label: D82
data_type: string
name: extract_symbolic_data
arguments: label: D51
data_type: string
name: extract_symbolic_data
arguments: label: D31
data_type: string
name: extract_symbolic_data
arguments: label: D47
data_type: string
name: extract_symbolic_data
arguments: label: D34
data_type: string
name: extract_symbolic_data
arguments: label: D45
data_type: string
name: extract_symbolic_data
arguments: label: D117
data_type: string
name: extract_symbolic_data
arguments: label: D48
data_type: string
name: extract_symbolic_data
arguments: label: D42
data_type: string
name: extract_symbolic_data
arguments: label: D83
data_type: string

tool: D59: BP

tool: D106: bp

tool: D82: SP

tool: D51: sp

tool: D31: IP

tool: D47: ip

tool: D34: PTBR

tool: D45: ptbr

tool: D117: PTLR

tool: D48: ptlr

tool: D42: EFR

tool: D83: efr

assistant: ```c
int getRegArg(char *arg) {
  int argvalue;
  if (strcmp(arg, "BP") == 0 || strcmp(arg, "bp") == 0)
    return (28);
  else if (strcmp(arg, "SP") == 0 || strcmp(arg, "sp") == 0)
    return (29);
  else if (strcmp(arg, "IP") == 0 || strcmp(arg, "ip") == 0)
    return (30);
  else if (strcmp(arg, "PTBR") == 0 || strcmp(arg, "ptbr") == 0)
    return (31);
  else if (strcmp(arg, "PTLR") == 0 || strcmp(arg, "ptlr") == 0)
    return (32);
  else if (strcmp(arg, "EFR") == 0 || strcmp(arg, "efr") == 0)
    return (33);
  else
    argvalue = atoi(arg + 1);
  switch (arg[0]) {
  case 'R':
  case 'r':
    if (argvalue >= 0 && argvalue < 8)
      ;
    return (0 + argvalue);
    break;
  case 'S':
  case 's':
    if (argvalue >= 0 && argvalue < 16)
      ;
    return (8 + argvalue);
    break;
  case 'T':
  case 't':
    if (argvalue >= 0 && argvalue < 4)
      ;
    return (24 + argvalue);
    break;
  }
  return -1;
}
```