user: What would the C source look like for the assembly code provided here?

```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     L52
  cmp    $0x64,%dil
  je     L101
  jg     L163
  cmp    $0x22,%dil
  je     L130
  cmp    $0x27,%dil
  jne    L153
L70:
  lea    0x7(%rbx),%ecx
  test   %ebx,%ebx
  js     L16
L115:
  cmp    $0x1,%ebx
  sbb    $0x0,%ecx
L133:
  add    $0x10,%rsp
  mov    %ebx,%r8d
  mov    %r12,%rsi
  mov    %rbp,%rdi
  pop    %rbx
  lea    D37(%rip),%rdx
  pop    %rbp
  mov    $0x1,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1060 <snprintf@plt>
  nopl   0x0(%rax)
L163:
  cmp    $0x6d,%dil
  je     L70
  cmp    $0x73,%dil
  jne    L153
L130:
  test   %ebx,%ebx
  js     L20
  lea    0x9(%rbx),%ecx
  jmp    L115
  nopl   (%rax)
L52:
  pxor   %xmm1,%xmm1
  mov    $0x20,%eax
  mov    $0x2d,%r14d
  comisd %xmm0,%xmm1
  andpd  D29(%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  D4(%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  D4(%rip),%xmm1
  test   %ebx,%ebx
  js     L49
  lea    0x3(%rbx),%r9d
  mov    $0x2,%eax
  cmove  %eax,%r9d
L23:
  sub    $0x8,%rsp
  mov    %r13d,%r8d
  mov    %r14d,%ecx
  push   %rbx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movapd %xmm2,%xmm0
  lea    D20(%rip),%rdx
  mov    $0x2,%eax
  call   <snprintf@plt>
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L101:
  lea    0x5(%rsi),%ecx
  test   %esi,%esi
  jns    L115
  mov    $0x6,%ebx
  mov    $0xb,%ecx
  jmp    L133
  nopw   0x0(%rax,%rax,1)
L16:
  mov    $0x4,%ebx
  mov    $0xb,%ecx
  jmp    L133
  nop
L20:
  mov    $0x2,%ebx
  mov    $0xb,%ecx
  jmp    L133
L153:
  lea    0x3(%rbx),%ecx
  test   %ebx,%ebx
  jns    L115
  mov    $0x8,%ebx
  mov    $0xb,%ecx
  jmp    L133
  nopl   0x0(%rax)
L49:
  mov    $0x2,%ebx
  mov    $0x5,%r9d
  jmp    L23
```

tool_calls: name: disassemble_data
arguments: label: D37
type: string
name: disassemble_data
arguments: label: D29
type: qword[2]
name: disassemble_data
arguments: label: D4
type: f64
name: disassemble_data
arguments: label: D20
type: string

tool: D37: %*.*lf

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

tool: D4: 60

tool: D20: %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);
  }
}
```