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

```asm
<wrangle>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x10,%rsp
  cmp    $0x68,%dil
  je     L136
  cmp    $0x64,%dil
  je     L175
  jg     L125
  cmp    $0x22,%dil
  je     L116
  cmp    $0x27,%dil
  jne    L51
L16:
  lea    0x7(%rbx),%ecx
  test   %ebx,%ebx
  js     L7
L37:
  cmp    $0x1,%ebx
  sbb    $0x0,%ecx
L21:
  add    $0x10,%rsp
  mov    %ebx,%r8d
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbx
  lea    D33(%rip),%rdx
  pop    %rbp
  mov    $0x1,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <snprintf@plt>
  nopl   0x0(%rax)
L125:
  cmp    $0x6d,%dil
  je     L16
  cmp    $0x73,%dil
  jne    L51
L116:
  test   %ebx,%ebx
  js     L3
  lea    0x9(%rbx),%ecx
  jmp    L37
  nopl   (%rax)
L136:
  pxor   %xmm1,%xmm1
  mov    $0x20,%eax
  mov    $0x2d,%r14d
  comisd %xmm0,%xmm1
  andpd  D2(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmovbe %eax,%r14d
  call   <floor@plt>
  pxor   %xmm1,%xmm1
  movsd  0x8(%rsp),%xmm0
  cvtsi2sd %eax,%xmm1
  mov    %eax,%r13d
  subsd  %xmm1,%xmm0
  mulsd  D42(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <floor@plt>
  pxor   %xmm2,%xmm2
  movsd  0x8(%rsp),%xmm0
  cvtsi2sd %eax,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  mulsd  D42(%rip),%xmm1
  test   %ebx,%ebx
  js     L33
  lea    0x3(%rbx),%r9d
  mov    $0x2,%eax
  cmove  %eax,%r9d
L178:
  sub    $0x8,%rsp
  mov    %r13d,%r8d
  mov    %r14d,%ecx
  push   %rbx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movapd %xmm2,%xmm0
  lea    D22(%rip),%rdx
  mov    $0x2,%eax
  call   <snprintf@plt>
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L175:
  lea    0x5(%rsi),%ecx
  test   %esi,%esi
  jns    L37
  mov    $0x6,%ebx
  mov    $0xb,%ecx
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L7:
  mov    $0x4,%ebx
  mov    $0xb,%ecx
  jmp    L21
  nop
L3:
  mov    $0x2,%ebx
  mov    $0xb,%ecx
  jmp    L21
L51:
  lea    0x3(%rbx),%ecx
  test   %ebx,%ebx
  jns    L37
  mov    $0x8,%ebx
  mov    $0xb,%ecx
  jmp    L21
  nopl   0x0(%rax)
L33:
  mov    $0x2,%ebx
  mov    $0x5,%r9d
  jmp    L178
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D33
datatype: string
name: extract_symbolic_data
arguments: data_label: D2
datatype: qword[2]
name: extract_symbolic_data
arguments: data_label: D42
datatype: f64
name: extract_symbolic_data
arguments: data_label: D22
datatype: string

tool: D33: %*.*lf

tool: {"D2": [0x7fffffffffffffff,0x0000000000000000]}

tool: D42: 60

tool: D22: %c%02d %02d %0*.*lf

assistant: ```c
void wrangle(double angle, char unit, int precision, size_t str_len, char str[]) {
  char sign;
  int hour, min;
  int width;
  double a, sec;
  if (unit == 'h') {
    sign = (angle < 0.) ? '-' : ' ';
    a = fabs(angle);
    hour = floor(a);
    a = (a - hour) * 60.;
    min = floor(a);
    a = (a - min) * 60.;
    sec = a;
    if (precision < 0)
      precision = 9 - 7;
    width = precision + 3;
    if (precision == 0)
      width--;
    snprintf(str, str_len, "%c%02d %02d %0*.*lf", sign, hour, min, width, precision, sec);
  } else {
    switch (unit) {
    case 'r':
    default:
      if (precision < 0)
        precision = 9 - 1;
      width = precision + 3;
      break;
    case 'd':
    case '°':
      if (precision < 0)
        precision = 9 - 3;
      width = precision + 5;
      break;
    case 'm':
    case '\'':
    case '´':
      if (precision < 0)
        precision = 9 - 5;
      width = precision + 7;
      break;
    case 's':
    case '"':
    case '¨':
      if (precision < 0)
        precision = 9 - 7;
      width = precision + 9;
      break;
    }
    if (precision == 0)
      width--;
    snprintf(str, str_len, "%*.*lf", width, precision, angle);
  }
}
```