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

```asm
<f_prob>:
  endbr64
  test   %edi,%edi
  jns    L117
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L117:
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  mov    %rsi,%rdi
  push   %rbx
  mov    %r8,%rbx
  sub    $0x10,%rsp
  call   <code_table_4_9_location@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L120
  movzbl (%rax),%edx
  lea    D36(%rip),%rsi
  xor    %eax,%eax
  mov    %rbx,%rdi
  call   <sprintf@plt>
  cmpb   $0x4,(%r12)
  ja     L47
  movzbl (%r12),%eax
  lea    D66(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  cs nopw 0x0(%rax,%rax,1)
  lea    0x7(%r12),%rdi
  call   <int4@plt>
  movzbl 0x6(%r12),%edi
  mov    %eax,%esi
L22:
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  lea    D2(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  cvttsd2si %xmm0,%edx
  movzbl %dl,%edx
  call   <sprintf@plt>
L47:
  cmp    $0x63,%ebp
  je     L128
L25:
  mov    %rbx,%rdi
  call   <strlen@plt>
  movzbl -0x1(%r12),%ecx
  movzbl -0x2(%r12),%edx
  lea    D72(%rip),%rsi
  cltq
  lea    (%rbx,%rax,1),%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
L120:
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L128:
  mov    %rbx,%rdi
  call   <strlen@plt>
  movzbl 0x1(%r12),%edx
  movzbl 0x5(%r12),%esi
  cltq
  movzbl 0x4(%r12),%r9d
  movzbl 0x3(%r12),%r8d
  add    %rax,%rbx
  movzbl 0x2(%r12),%ecx
  mov    %edx,%eax
  test   %dl,%dl
  jns    L36
  and    $0x7f,%eax
  neg    %eax
  movzbl %al,%edx
L36:
  sub    $0x8,%rsp
  mov    %rbx,%rdi
  xor    %eax,%eax
  push   %rsi
  lea    D14(%rip),%rsi
  call   <sprintf@plt>
  pop    %rax
  pop    %rdx
  jmp    L25
  cs nopw 0x0(%rax,%rax,1)
  lea    0x2(%r12),%rdi
  call   <int4@plt>
  movzbl 0x1(%r12),%edi
  mov    %eax,%esi
  jmp    L22
  nopw   0x0(%rax,%rax,1)
  lea    0x7(%r12),%rdi
  call   <int4@plt>
  movzbl 0x6(%r12),%edi
  mov    %eax,%esi
L16:
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  lea    D49(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  cvttsd2si %xmm0,%edx
  movzbl %dl,%edx
  call   <sprintf@plt>
  jmp    L47
  nopl   0x0(%rax)
  lea    0x2(%r12),%r13
  lea    0x7(%r12),%r14
  mov    %r13,%rdi
  call   <int4@plt>
  movzbl 0x1(%r12),%edi
  mov    %eax,%esi
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  mov    %r14,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <int4@plt>
  movzbl 0x6(%r12),%edi
  mov    %eax,%esi
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  movsd  0x8(%rsp),%xmm1
  ucomisd %xmm0,%xmm1
  jp     L15
  jne    L15
  mov    %r13,%rdi
  call   <int4@plt>
  movzbl 0x1(%r12),%edi
  mov    %eax,%esi
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  lea    D65(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  cvttsd2si %xmm0,%edx
  movzbl %dl,%edx
  call   <sprintf@plt>
  jmp    L47
  nopl   0x0(%rax)
  lea    0x2(%r12),%rdi
  call   <int4@plt>
  movzbl 0x1(%r12),%edi
  mov    %eax,%esi
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L15:
  mov    %r14,%rdi
  call   <int4@plt>
  movzbl 0x6(%r12),%edi
  mov    %eax,%esi
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  mov    %r13,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <int4@plt>
  movzbl 0x1(%r12),%edi
  mov    %eax,%esi
  mov    %edi,%eax
  and    $0x7f,%eax
  neg    %eax
  test   %dil,%dil
  cmovs  %eax,%edi
  call   <scaled2flt@plt>
  movsd  0x8(%rsp),%xmm1
  mov    %rbx,%rdi
  lea    D51(%rip),%rsi
  cvttsd2si %xmm0,%edx
  mov    $0x1,%eax
  movapd %xmm1,%xmm0
  movzbl %dl,%edx
  call   <sprintf@plt>
  jmp    L47
```

tool_calls: name: read_data
arguments: label: D36
type: string
name: read_data
arguments: label: D2
type: string
name: read_data
arguments: label: D72
type: string
name: read_data
arguments: label: D14
type: string
name: read_data
arguments: label: D49
type: string
name: read_data
arguments: label: D65
type: string
name: read_data
arguments: label: D51
type: string

tool: D36: probtype=%d 

tool: D2: prob <%g

tool: D72: :prob fcst %u/%u

tool: D14:  LOWER LIMIT scale=%d, val= 0x%.2x 0x%.2x 0x%.2x 0x%.2x

tool: D49: prob >%g

tool: D65: prob =%g

tool: D51: prob >=%g <%g

assistant: ```c
int f_prob(int mode, unsigned char **sec, float *data, unsigned int ndata, char *inv_out, void **local) {
  unsigned char *p;
  if (mode == -1) {
    return 0;
  } else if (mode >= 0) {
    p = code_table_4_9_location(sec);
    if (p == NULL)
      return 0;
    sprintf(inv_out, "probtype=%d ", *p);
    switch (*p) {
    case 0:
      sprintf(inv_out, "prob <%g", scaled2flt(((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), int4(p + 2)));
      break;
    case 1:
      sprintf(inv_out, "prob >%g", scaled2flt(((p[6] & 0x80) ? -(int)(p[6] & 127) : (int)(p[6] & 127)), int4(p + 7)));
      break;
    case 2:
      if (scaled2flt(((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), int4(p + 2)) == scaled2flt(((p[6] & 0x80) ? -(int)(p[6] & 127) : (int)(p[6] & 127)), int4(p + 7))) {
        sprintf(inv_out, "prob =%g", scaled2flt(((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), int4(p + 2)));
        break;
      }
      sprintf(inv_out, "prob >=%g <%g", scaled2flt(((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), int4(p + 2)), scaled2flt(((p[6] & 0x80) ? -(int)(p[6] & 127) : (int)(p[6] & 127)), int4(p + 7)));
      break;
    case 3:
      sprintf(inv_out, "prob >%g", scaled2flt(((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), int4(p + 2)));
      break;
    case 4:
      sprintf(inv_out, "prob <%g", scaled2flt(((p[6] & 0x80) ? -(int)(p[6] & 127) : (int)(p[6] & 127)), int4(p + 7)));
      break;
    }
    if (mode == 99) {
      inv_out += strlen(inv_out);
      sprintf(inv_out, " LOWER LIMIT scale=%d, val= 0x%.2x 0x%.2x 0x%.2x 0x%.2x", ((p[1] & 0x80) ? -(int)(p[1] & 127) : (int)(p[1] & 127)), p[2], p[3], p[4], p[5]);
    }
    inv_out += strlen(inv_out);
    sprintf(inv_out, ":prob fcst %u/%u", p[-2], p[-1]);
  }
  return 0;
}
```