user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<mgh_umck>:
  endbr64
  mov    %rdi,%r8
  cmp    $0x12,%edx
  ja     L198
  sub    $0x8,%rsp
  mov    %edx,%edx
  lea    D137(%rip),%rcx
  movslq (%rcx,%rdx,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  cmp    $0x3,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D53(%rip),%rcx
  lea    D333(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
L134:
  add    $0x8,%rsp
  ret
  cmp    $0x6,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D317(%rip),%rcx
  lea    D52(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x3,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D337(%rip),%rcx
  lea    D277(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x2,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D136(%rip),%rcx
  lea    D154(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x3,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D275(%rip),%rcx
  lea    D63(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  test   %esi,%esi
  setg   %dil
  movzbl %dil,%edi
  lea    D40(%rip),%rcx
  lea    D175(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x1,%esi
  setg   %dil
  movzbl %dil,%edi
  lea    D65(%rip),%rcx
  lea    D70(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  test   %esi,%esi
  setg   %dil
  movzbl %dil,%edi
  lea    D115(%rip),%rcx
  lea    D84(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  test   %esi,%esi
  setg   %dil
  movzbl %dil,%edi
  lea    D185(%rip),%rcx
  lea    D35(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x2,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D320(%rip),%rcx
  lea    D366(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x4,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D236(%rip),%rcx
  lea    D56(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x3,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D325(%rip),%rcx
  lea    D111(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  test   %esi,%esi
  setg   %dil
  movzbl %dil,%edi
  lea    D59(%rip),%rcx
  lea    D387(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  mov    %esi,%edi
  not    %edi
  and    $0x1,%edi
  test   %esi,%esi
  mov    $0x0,%eax
  cmovle %eax,%edi
  lea    D119(%rip),%rcx
  lea    D262(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  mov    $0x0,%edi
  test   %esi,%esi
  jle    L217
  test   $0x3,%sil
  sete   %dil
  movzbl %dil,%edi
L217:
  lea    D98(%rip),%rcx
  lea    D210(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x2,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D334(%rip),%rcx
  lea    D287(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  cmp    $0x4,%esi
  sete   %dil
  movzbl %dil,%edi
  lea    D203(%rip),%rcx
  lea    D241(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  sub    $0x1,%esi
  cmp    $0x31,%esi
  setbe  %dil
  movzbl %dil,%edi
  lea    D316(%rip),%rcx
  lea    D41(%rip),%rdx
  mov    %r8,%rsi
  call   <check@plt>
  jmp    L134
  mov    $0xffffffff,%eax
  test   %rdi,%rdi
  je     L134
  lea    D290(%rip),%rax
  mov    %rax,(%rdi)
  mov    $0xffffffff,%eax
  jmp    L134
L198:
  mov    $0xffffffff,%eax
  test   %rdi,%rdi
  je     L4
  lea    D290(%rip),%rax
  mov    %rax,(%rdi)
  mov    $0xffffffff,%eax
  ret
L4:
  ret
```

tool_calls: name: parse_data
arguments: label: D53
data_type: string
name: parse_data
arguments: label: D333
data_type: string
name: parse_data
arguments: label: D317
data_type: string
name: parse_data
arguments: label: D52
data_type: string
name: parse_data
arguments: label: D337
data_type: string
name: parse_data
arguments: label: D277
data_type: string
name: parse_data
arguments: label: D136
data_type: string
name: parse_data
arguments: label: D154
data_type: string
name: parse_data
arguments: label: D275
data_type: string
name: parse_data
arguments: label: D63
data_type: string
name: parse_data
arguments: label: D40
data_type: string
name: parse_data
arguments: label: D175
data_type: string
name: parse_data
arguments: label: D65
data_type: string
name: parse_data
arguments: label: D70
data_type: string
name: parse_data
arguments: label: D115
data_type: string
name: parse_data
arguments: label: D84
data_type: string
name: parse_data
arguments: label: D185
data_type: string
name: parse_data
arguments: label: D35
data_type: string
name: parse_data
arguments: label: D320
data_type: string
name: parse_data
arguments: label: D366
data_type: string
name: parse_data
arguments: label: D236
data_type: string
name: parse_data
arguments: label: D56
data_type: string
name: parse_data
arguments: label: D325
data_type: string
name: parse_data
arguments: label: D111
data_type: string
name: parse_data
arguments: label: D59
data_type: string
name: parse_data
arguments: label: D387
data_type: string
name: parse_data
arguments: label: D119
data_type: string
name: parse_data
arguments: label: D262
data_type: string
name: parse_data
arguments: label: D98
data_type: string
name: parse_data
arguments: label: D210
data_type: string
name: parse_data
arguments: label: D334
data_type: string
name: parse_data
arguments: label: D287
data_type: string
name: parse_data
arguments: label: D203
data_type: string
name: parse_data
arguments: label: D241
data_type: string
name: parse_data
arguments: label: D316
data_type: string
name: parse_data
arguments: label: D41
data_type: string
name: parse_data
arguments: label: D290
data_type: string

tool: D53: N must be 3 for problem #1

tool: D333: Helical valley function.

tool: D317: N must be 6 for problem #2

tool: D52: Biggs exp6 function.

tool: D337: N must be 3 for problem #3

tool: D277: Gaussian function.

tool: D136: N must be 2 for problem #4

tool: D154: Powell badly scaled function.

tool: D275: N must be 3 for problem #5

tool: D63: Box 3-dimensional function.

tool: D40: N must be >= 1 in problem #6

tool: D175: Variably dimensioned function.

tool: D65: N may be 2 or greater but is usually 6 or 9 for problem #7

tool: D70: Watson function.

tool: D115: N must be >= 1 in problem #8

tool: D84: Penalty function I.

tool: D185: N must be >= 1 in problem #9

tool: D35: Penalty function II.

tool: D320: N must be 2 for problem #10

tool: D366: Brown badly scaled function.

tool: D236: N must be 4 for problem #11

tool: D56: Brown and Dennis function.

tool: D325: N must be 3 for problem #12

tool: D111: Gulf research and development function.

tool: D59: N must be >= 1 in problem #13

tool: D387: Trigonometric function.

tool: D119: N must be a multiple of 2 in problem #14

tool: D262: Extended Rosenbrock function.

tool: D98: N must be a multiple of 4 in problem #15

tool: D210: Extended Powell function.

tool: D334: N must be 2 for problem #16

tool: D287: Beale function.

tool: D203: N must be 4 for problem #17

tool: D241: Wood function.

tool: D316: N must be <= 50 for problem #18

tool: D41: Chebyquad function.

tool: D290: PROB must be an integer between 1 and 18

assistant: ```c
int mgh_umck(const char **str, int n, int prob) {
  int status = (0);
  switch (prob) {
  case 1:
    status = check(n == 3, str, "Helical valley function.", "N must be 3 for problem #1");
    break;
  case 2:
    status = check(n == 6, str, "Biggs exp6 function.", "N must be 6 for problem #2");
    break;
  case 3:
    status = check(n == 3, str, "Gaussian function.", "N must be 3 for problem #3");
    break;
  case 4:
    status = check(n == 2, str, "Powell badly scaled function.", "N must be 2 for problem #4");
    break;
  case 5:
    status = check(n == 3, str, "Box 3-dimensional function.", "N must be 3 for problem #5");
    break;
  case 6:
    status = check(n >= 1, str, "Variably dimensioned function.", "N must be >= 1 in problem #6");
    break;
  case 7:
    status = check(n >= 2, str, "Watson function.", "N may be 2 or greater but is usually 6 or 9 for problem #7");
    break;
  case 8:
    status = check(n >= 1, str, "Penalty function I.", "N must be >= 1 in problem #8");
    break;
  case 9:
    status = check(n >= 1, str, "Penalty function II.", "N must be >= 1 in problem #9");
    break;
  case 10:
    status = check(n == 2, str, "Brown badly scaled function.", "N must be 2 for problem #10");
    break;
  case 11:
    status = check(n == 4, str, "Brown and Dennis function.", "N must be 4 for problem #11");
    break;
  case 12:
    status = check(n == 3, str, "Gulf research and development function.", "N must be 3 for problem #12");
    break;
  case 13:
    status = check(n >= 1, str, "Trigonometric function.", "N must be >= 1 in problem #13");
    break;
  case 14:
    status = check(n >= 1 && n % 2 == 0, str, "Extended Rosenbrock function.", "N must be a multiple of 2 in problem #14");
    break;
  case 15:
    status = check(n >= 1 && n % 4 == 0, str, "Extended Powell function.", "N must be a multiple of 4 in problem #15");
    break;
  case 16:
    status = check(n == 2, str, "Beale function.", "N must be 2 for problem #16");
    break;
  case 17:
    status = check(n == 4, str, "Wood function.", "N must be 4 for problem #17");
    break;
  case 18:
    status = check(n >= 1 && n <= 50, str, "Chebyquad function.",
                   "N must be <= "
                   "50"
                   " for problem #18");
    break;
  default:
    status = (-1);
    if (str != NULL) {
      *str = "PROB must be an integer between 1 and 18";
    }
  }
  return status;
}
```