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

```asm
<wrangle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x28(%rbp)
  mov    %edi,%eax
  mov    %esi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %al,-0x2c(%rbp)
  cmpb   $0x68,-0x2c(%rbp)
  jne    L192
  pxor   %xmm0,%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L16
  mov    $0x2d,%eax
  jmp    L194
L16:
  mov    $0x20,%eax
L194:
  mov    %al,-0x1d(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D45(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    %eax,-0x18(%rbp)
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x18(%rbp),%xmm2
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D10(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    %eax,-0x14(%rbp)
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x14(%rbp),%xmm2
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D10(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  jns    L174
  movl   $0x2,-0x30(%rbp)
L174:
  mov    -0x30(%rbp),%eax
  add    $0x3,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  jne    L20
  subl   $0x1,-0x1c(%rbp)
L20:
  pxor   %xmm3,%xmm3
  cvtsi2sdl -0x14(%rbp),%xmm3
  movq   %xmm3,%rcx
  movsbl -0x1d(%rbp),%edx
  movsd  -0x8(%rbp),%xmm0
  mov    -0x1c(%rbp),%r9d
  mov    -0x18(%rbp),%r8d
  mov    -0x38(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x30(%rbp),%edi
  push   %rdi
  movapd %xmm0,%xmm1
  movq   %rcx,%xmm0
  mov    %edx,%ecx
  lea    D9(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
  jmp    L206
L192:
  movsbl -0x2c(%rbp),%eax
  cmp    $0x73,%eax
  je     L145
  cmp    $0x73,%eax
  jg     L130
  cmp    $0x6d,%eax
  je     L179
  cmp    $0x6d,%eax
  jg     L130
  cmp    $0x64,%eax
  je     L37
  cmp    $0x64,%eax
  jg     L130
  cmp    $0x22,%eax
  je     L145
  cmp    $0x27,%eax
  je     L179
L130:
  cmpl   $0x0,-0x30(%rbp)
  jns    L55
  movl   $0x8,-0x30(%rbp)
L55:
  mov    -0x30(%rbp),%eax
  add    $0x3,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L171
L37:
  cmpl   $0x0,-0x30(%rbp)
  jns    L186
  movl   $0x6,-0x30(%rbp)
L186:
  mov    -0x30(%rbp),%eax
  add    $0x5,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L171
L179:
  cmpl   $0x0,-0x30(%rbp)
  jns    L123
  movl   $0x4,-0x30(%rbp)
L123:
  mov    -0x30(%rbp),%eax
  add    $0x7,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L171
L145:
  cmpl   $0x0,-0x30(%rbp)
  jns    L193
  movl   $0x2,-0x30(%rbp)
L193:
  mov    -0x30(%rbp),%eax
  add    $0x9,%eax
  mov    %eax,-0x1c(%rbp)
  nop
L171:
  cmpl   $0x0,-0x30(%rbp)
  jne    L116
  subl   $0x1,-0x1c(%rbp)
L116:
  mov    -0x28(%rbp),%rcx
  mov    -0x30(%rbp),%edi
  mov    -0x1c(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  movq   %rcx,%xmm0
  mov    %edi,%r8d
  mov    %edx,%ecx
  lea    D23(%rip),%rdx
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <snprintf@plt>
L206:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D45
datatype: qword
name: parse_data
arguments: data_label: D10
datatype: f64
name: parse_data
arguments: data_label: D9
datatype: string
name: parse_data
arguments: data_label: D23
datatype: string

tool: D45: 9223372036854775807

tool: D10: 60

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

tool: D23: %*.*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);
  }
}
```