user: 请将以下的汇编代码转换成C语言代码：

```asm
<wrangle>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %esi,%ebx
  mov    %rdx,%r12
  mov    %rcx,%rbp
  cmp    $0x68,%dil
  je     L91
  cmp    $0x64,%dil
  je     L102
  jg     L69
  cmp    $0x22,%dil
  je     L39
  cmp    $0x27,%dil
  jne    L73
L89:
  test   %ebx,%ebx
  mov    $0x4,%eax
  cmovs  %eax,%ebx
  lea    0x7(%rbx),%ecx
  jmp    L24
L91:
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  mov    $0x2d,%r13d
  mov    $0x20,%eax
  cmovbe %eax,%r13d
  andpd  D43(%rip),%xmm0
  movq   %xmm0,%r15
  call   <floor@plt>
  mov    %eax,%r14d
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movq   %r15,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  D48(%rip),%xmm0
  movq   %xmm0,%r15
  call   <floor@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movq   %r15,%xmm1
  subsd  %xmm0,%xmm1
  mulsd  D48(%rip),%xmm1
  test   %ebx,%ebx
  js     L88
  lea    0x3(%rbx),%r9d
  mov    $0x2,%eax
  cmove  %eax,%r9d
L28:
  movsbl %r13b,%ecx
  sub    $0x8,%rsp
  push   %rbx
  mov    %r14d,%r8d
  lea    D25(%rip),%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x2,%eax
  call   <snprintf@plt>
  add    $0x10,%rsp
  jmp    L104
L88:
  mov    $0x2,%ebx
  mov    $0x5,%r9d
  jmp    L28
L69:
  cmp    $0x6d,%dil
  je     L89
  cmp    $0x73,%dil
  jne    L73
L39:
  test   %ebx,%ebx
  mov    $0x2,%eax
  cmovs  %eax,%ebx
  lea    0x9(%rbx),%ecx
  jmp    L24
L73:
  test   %ebx,%ebx
  mov    $0x8,%eax
  cmovs  %eax,%ebx
  lea    0x3(%rbx),%ecx
L24:
  cmp    $0x1,%ebx
  sbb    $0x0,%ecx
  mov    %ebx,%r8d
  lea    D9(%rip),%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x1,%eax
  call   <snprintf@plt>
L104:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  test   %esi,%esi
  mov    $0x6,%eax
  cmovs  %eax,%ebx
  lea    0x5(%rbx),%ecx
  jmp    L24
```

tool_calls: name: parse_data
arguments: tag: D43
type_guessed: qword[2]
name: parse_data
arguments: tag: D48
type_guessed: f64
name: parse_data
arguments: tag: D25
type_guessed: string
name: parse_data
arguments: tag: D9
type_guessed: string

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

tool: D48: 60

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

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