user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<f_ens>:
  endbr64
  test   %edi,%edi
  jns    L16
  mov    $0x0,%eax
  ret
L16:
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%rbx
  mov    %r8,%r12
  mov    %rsi,%rdi
  mov    $0x0,%eax
  call   <code_table_4_7@plt>
  mov    %eax,%ebp
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <code_table_4_6@plt>
  mov    %eax,%r13d
  mov    0x8(%rbx),%rdx
  movzbl 0x5(%rdx),%eax
  shl    $0x8,%eax
  movzbl 0x6(%rdx),%edx
  add    %edx,%eax
  mov    %eax,0xc(%rsp)
  mov    0x20(%rbx),%rax
  movzbl 0x7(%rax),%r14d
  movzbl 0x8(%rax),%r15d
  test   %r13d,%r13d
  js     L31
  cmp    $0x4,%r13d
  jg     L188
  ja     L384
  mov    %r13d,%r13d
  lea    D315(%rip),%rdx
  movslq (%rdx,%r13,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L188:
  cmp    $0xc0,%r13d
  jne    L384
  cmpl   $0x7,0xc(%rsp)
  je     L344
L384:
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <perturbation_number@plt>
  mov    %eax,%ecx
  mov    %r13d,%edx
  lea    D125(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L239:
  test   %ebp,%ebp
  js     L72
  mov    %r12,%rdi
  call   <strlen@plt>
  add    %r12,%rax
  lea    0x1(%rax),%r12
  movb   $0x20,(%rax)
  movb   $0x0,0x1(%rax)
L144:
  movzbl %r14b,%r14d
  shl    $0x8,%r14d
  movzbl %r15b,%r15d
  add    %r15d,%r14d
  cmp    $0x9,%ebp
  jle    L243
  lea    -0xc0(%rbp),%eax
  lea    D241(%rip),%rsi
  cmp    $0x9,%eax
  ja     L296
  sub    $0xc0,%ebp
  cmp    $0x9,%ebp
  ja     L245
  mov    %ebp,%ebp
  lea    D248(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  movabs $0x722d69683d534e45,%rax
  mov    %rax,(%r12)
  movl   $0x63207365,0x8(%r12)
  movw   $0x6c74,0xc(%r12)
  movb   $0x0,0xe(%r12)
  jmp    L239
  movabs $0x2d776f6c3d534e45,%rax
  movabs $0x6c746320736572,%rdx
  mov    %rax,(%r12)
  mov    %rdx,0x8(%r12)
  jmp    L239
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <perturbation_number@plt>
  mov    %eax,%edx
  lea    D302(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L239
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <perturbation_number@plt>
  mov    %eax,%edx
  lea    D136(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L239
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <perturbation_number@plt>
  mov    %eax,%edx
  lea    D167(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L239
L344:
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <perturbation_number@plt>
  mov    %eax,%edx
  lea    D228(%rip),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L239
L31:
  test   %ebp,%ebp
  jns    L144
  jmp    L72
L243:
  ja     L30
  mov    %ebp,%ebp
  lea    D38(%rip),%rdx
  movslq (%rdx,%rbp,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    D89(%rip),%rsi
L296:
  mov    %r12,%rdi
  call   <strcpy@plt>
L72:
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  lea    D241(%rip),%rsi
  jmp    L296
  cmp    $0x2,%r14d
  je     L156
  lea    D99(%rip),%rsi
  cmp    $0xc,%r14d
  jne    L296
L156:
  lea    D108(%rip),%rsi
  jmp    L296
  cmp    $0x2,%r14d
  je     L408
  lea    D34(%rip),%rsi
  cmp    $0xc,%r14d
  jne    L296
L408:
  lea    D41(%rip),%rsi
  jmp    L296
  lea    D419(%rip),%rsi
  jmp    L296
  lea    D285(%rip),%rsi
  jmp    L296
  cmp    $0x2,%r14d
  je     L136
  lea    D273(%rip),%rsi
  cmp    $0xc,%r14d
  jne    L296
L136:
  lea    D162(%rip),%rsi
  jmp    L296
  lea    D207(%rip),%rsi
  jmp    L296
  lea    D50(%rip),%rsi
  jmp    L296
  lea    D204(%rip),%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D86(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D197(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D148(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D393(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D420(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D300(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D199(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D90(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D223(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
  cmpl   $0x7,0xc(%rsp)
  lea    D241(%rip),%rsi
  lea    D232(%rip),%rax
  cmove  %rax,%rsi
  jmp    L296
L245:
  lea    D241(%rip),%rsi
  jmp    L296
  lea    D414(%rip),%rsi
  jmp    L296
```

tool_calls: name: retrieve_data
arguments: tag: D125
datatype: string
name: retrieve_data
arguments: tag: D241
datatype: string
name: retrieve_data
arguments: tag: D302
datatype: string
name: retrieve_data
arguments: tag: D136
datatype: string
name: retrieve_data
arguments: tag: D167
datatype: string
name: retrieve_data
arguments: tag: D228
datatype: string
name: retrieve_data
arguments: tag: D89
datatype: string
name: retrieve_data
arguments: tag: D99
datatype: string
name: retrieve_data
arguments: tag: D108
datatype: string
name: retrieve_data
arguments: tag: D34
datatype: string
name: retrieve_data
arguments: tag: D41
datatype: string
name: retrieve_data
arguments: tag: D419
datatype: string
name: retrieve_data
arguments: tag: D285
datatype: string
name: retrieve_data
arguments: tag: D273
datatype: string
name: retrieve_data
arguments: tag: D162
datatype: string
name: retrieve_data
arguments: tag: D207
datatype: string
name: retrieve_data
arguments: tag: D50
datatype: string
name: retrieve_data
arguments: tag: D204
datatype: string
name: retrieve_data
arguments: tag: D86
datatype: string
name: retrieve_data
arguments: tag: D197
datatype: string
name: retrieve_data
arguments: tag: D148
datatype: string
name: retrieve_data
arguments: tag: D393
datatype: string
name: retrieve_data
arguments: tag: D420
datatype: string
name: retrieve_data
arguments: tag: D300
datatype: string
name: retrieve_data
arguments: tag: D199
datatype: string
name: retrieve_data
arguments: tag: D90
datatype: string
name: retrieve_data
arguments: tag: D223
datatype: string
name: retrieve_data
arguments: tag: D232
datatype: string
name: retrieve_data
arguments: tag: D414
datatype: string

tool: D125: ENS=? table4.6=%d pert=%d

tool: D241: unknown derived fcst

tool: D302: ENS=-%d

tool: D136: ENS=+%d

tool: D167: MM-ENS=%d

tool: D228: ENS=%d

tool: D89: ens mean

tool: D99: cluster std dev

tool: D108: ens std dev

tool: D34: normalized cluster std dev

tool: D41: normalized ens std dev

tool: D419: ens spread

tool: D285: ens large anom index

tool: D273: unwt cluster mean

tool: D162: unwt ens mean

tool: D207: 25%-75% range

tool: D50: min all members

tool: D204: max all members

tool: D86: unwt mode all members

tool: D197: 10% all members

tool: D148: 50% all members

tool: D393: 90% all members

tool: D420: stat. weight for each members

tool: D300: percentile from climate distribution

tool: D199: deviation of ens mean from daily climo

tool: D90: extreme forecast index

tool: D223: 25% all members

tool: D232: 75% all members

tool: D414: wt ens mean

assistant: ```c
int f_ens(int mode, unsigned char **sec, float *data, unsigned int ndata, char *inv_out, void **local) {
  int type, typefcst, pdt, center;
  const char *string;
  if (mode >= 0) {
    typefcst = code_table_4_7(sec);
    type = code_table_4_6(sec);
    center = ((int)((sec[1][5] << 8) + (sec[1][6])));
    pdt = (((int)((sec[4][7] << 8) + (sec[4][8]))));
    if (type >= 0) {
      switch (type) {
      case 0:
        sprintf(inv_out, "ENS=hi-res ctl");
        break;
      case 1:
        sprintf(inv_out, "ENS=low-res ctl");
        break;
      case 2:
        sprintf(inv_out, "ENS=-%d", perturbation_number(sec));
        break;
      case 3:
        sprintf(inv_out, "ENS=+%d", perturbation_number(sec));
        break;
      case 4:
        sprintf(inv_out, "MM-ENS=%d", perturbation_number(sec));
        break;
      case 192:
        if (center == 7) {
          sprintf(inv_out, "ENS=%d", perturbation_number(sec));
          break;
        }
      default:
        sprintf(inv_out, "ENS=? table4.6=%d pert=%d", type, perturbation_number(sec));
        break;
      }
      inv_out += strlen(inv_out);
      if (typefcst >= 0) {
        *inv_out++ = ' ';
        *inv_out = 0;
      }
    }
    if (typefcst >= 0) {
      string = "unknown derived fcst";
      switch (typefcst) {
      case 0:
        string = "ens mean";
        break;
      case 1:
        string = "wt ens mean";
        break;
      case 2:
        if ((pdt == 2) || (pdt == 12)) {
          string = "ens std dev";
          break;
        }
        string = "cluster std dev";
        break;
      case 3:
        if ((pdt == 2) || (pdt == 12)) {
          string = "normalized ens std dev";
          break;
        }
        string = "normalized cluster std dev";
        break;
      case 4:
        string = "ens spread";
        break;
      case 5:
        string = "ens large anom index";
        break;
      case 6:
        if ((pdt == 2) || (pdt == 12)) {
          string = "unwt ens mean";
          break;
        }
        string = "unwt cluster mean";
        break;
      case 7:
        string = "25%-75% range";
        break;
      case 8:
        string = "min all members";
        break;
      case 9:
        string = "max all members";
        break;
      case 192:
        if (center == 7)
          string = "unwt mode all members";
        break;
      case 193:
        if (center == 7)
          string = "10% all members";
        break;
      case 194:
        if (center == 7)
          string = "50% all members";
        break;
      case 195:
        if (center == 7)
          string = "90% all members";
        break;
      case 196:
        if (center == 7)
          string = "stat. weight for each members";
        break;
      case 197:
        if (center == 7)
          string = "percentile from climate distribution";
        break;
      case 198:
        if (center == 7)
          string = "deviation of ens mean from daily climo";
        break;
      case 199:
        if (center == 7)
          string = "extreme forecast index";
        break;
      case 200:
        if (center == 7)
          string = "25% all members";
        break;
      case 201:
        if (center == 7)
          string = "75% all members";
        break;
      }
      sprintf(inv_out, "%s", string);
      inv_out += strlen(inv_out);
    }
  }
  return 0;
}
```