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

```asm
<fs_sexa>:
  endbr64
  push   %r13
  pxor   %xmm2,%xmm2
  movslq %edx,%rcx
  pxor   %xmm1,%xmm1
  push   %r12
  cvtsi2sd %ecx,%xmm1
  mov    %rdi,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  sub    $0x8,%rsp
  comisd %xmm0,%xmm2
  ja     L105
  mulsd  %xmm0,%xmm1
  movsd  D76(%rip),%xmm0
  addsd  D41(%rip),%xmm1
  comisd %xmm0,%xmm1
  jae    L139
  cvttsd2si %xmm1,%rax
L39:
  xor    %edx,%edx
  div    %rcx
  mov    %rax,%rcx
  mov    %edx,%r13d
  jmp    L4
  nopl   0x0(%rax)
L105:
  mulsd  %xmm1,%xmm0
  movsd  D41(%rip),%xmm1
  subsd  %xmm0,%xmm1
  movsd  D76(%rip),%xmm0
  comisd %xmm0,%xmm1
  jae    L128
  cvttsd2si %xmm1,%rax
L37:
  xor    %edx,%edx
  div    %rcx
  mov    %edx,%r13d
  test   %eax,%eax
  jne    L45
  lea    -0x2(%rsi),%edx
  lea    D105(%rip),%rcx
  mov    %r12,%rdi
  lea    D83(%rip),%rsi
  call   <sprintf@plt>
  movslq %eax,%rbx
  add    %r12,%rbx
  cmp    $0xe10,%ebp
  je     L126
L55:
  jg     L145
  cmp    $0x3c,%ebp
  jne    L51
  mov    %r13d,%edx
  mov    %rbx,%rdi
  lea    D66(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  add    $0x8,%rsp
  cltq
  add    %rbx,%rax
  pop    %rbx
  pop    %rbp
  sub    %r12d,%eax
  pop    %r12
  pop    %r13
  ret
L51:
  cmp    $0x258,%ebp
  jne    L101
  movslq %r13d,%rdx
  mov    %r13d,%eax
  mov    %r13d,%ecx
  mov    %rbx,%rdi
  imul   $0x66666667,%rdx,%rdx
  sar    $0x1f,%eax
  lea    D44(%rip),%rsi
  sar    $0x22,%rdx
  sub    %eax,%edx
  lea    (%rdx,%rdx,4),%eax
  add    %eax,%eax
  sub    %eax,%ecx
  xor    %eax,%eax
  call   <sprintf@plt>
  cltq
  add    %rbx,%rax
L13:
  add    $0x8,%rsp
  sub    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L145:
  cmp    $0x8ca0,%ebp
  jne    L154
  movslq %r13d,%rdx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  imul   $0x1b4e81b5,%rdx,%rdx
  sar    $0x1f,%esi
  sar    $0x26,%rdx
  mov    %edx,%r8d
  sub    %esi,%edx
  sub    %esi,%r8d
  lea    D39(%rip),%rsi
  imul   $0x258,%r8d,%eax
  mov    %r13d,%r8d
  sub    %eax,%r8d
  movslq %r8d,%rcx
  mov    %r8d,%eax
  imul   $0x66666667,%rcx,%rcx
  sar    $0x1f,%eax
  sar    $0x22,%rcx
  sub    %eax,%ecx
  lea    (%rcx,%rcx,4),%eax
  add    %eax,%eax
  sub    %eax,%r8d
  xor    %eax,%eax
  call   <sprintf@plt>
  cltq
  add    %rbx,%rax
L84:
  add    $0x8,%rsp
  sub    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L154:
  cmp    $0x57e40,%ebp
  jne    L101
  movslq %r13d,%rdx
  mov    %r13d,%eax
  mov    %rbx,%rdi
  imul   $0x57619f1,%rdx,%rdx
  sar    $0x1f,%eax
  sar    $0x27,%rdx
  mov    %edx,%r8d
  sub    %eax,%edx
  sub    %eax,%r8d
  xor    %eax,%eax
  imul   $0x1770,%r8d,%ecx
  mov    %r13d,%r8d
  sub    %ecx,%r8d
  movslq %r8d,%rcx
  mov    %r8d,%esi
  imul   $0x51eb851f,%rcx,%rcx
  sar    $0x1f,%esi
  sar    $0x25,%rcx
  sub    %esi,%ecx
  imul   $0x64,%ecx,%esi
  sub    %esi,%r8d
  lea    D69(%rip),%rsi
  call   <sprintf@plt>
  cltq
  add    %rbx,%rax
  jmp    L84
  nopl   0x0(%rax)
L45:
  mov    %eax,%ecx
  neg    %ecx
L4:
  mov    %esi,%edx
  mov    %r12,%rdi
  lea    D108(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  movslq %eax,%rbx
  add    %r12,%rbx
  cmp    $0xe10,%ebp
  jne    L55
L126:
  movslq %r13d,%rdx
  mov    %r13d,%eax
  mov    %r13d,%ecx
  mov    %rbx,%rdi
  imul   $0xffffffff88888889,%rdx,%rdx
  sar    $0x1f,%eax
  lea    D121(%rip),%rsi
  shr    $0x20,%rdx
  add    %r13d,%edx
  sar    $0x5,%edx
  sub    %eax,%edx
  imul   $0x3c,%edx,%eax
  sub    %eax,%ecx
  xor    %eax,%eax
  call   <sprintf@plt>
  cltq
  add    %rbx,%rax
  jmp    L13
L128:
  subsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%rax
  btc    $0x3f,%rax
  jmp    L37
  nopl   0x0(%rax,%rax,1)
L139:
  subsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%rax
  btc    $0x3f,%rax
  jmp    L39
L101:
  lea    D53(%rip),%rdi
  mov    %ebp,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D76
data_type: byte[8]
name: extract_symbolic_data
arguments: label: D41
data_type: f64
name: extract_symbolic_data
arguments: label: D105
data_type: string
name: extract_symbolic_data
arguments: label: D83
data_type: string
name: extract_symbolic_data
arguments: label: D66
data_type: string
name: extract_symbolic_data
arguments: label: D44
data_type: string
name: extract_symbolic_data
arguments: label: D39
data_type: string
name: extract_symbolic_data
arguments: label: D69
data_type: string
name: extract_symbolic_data
arguments: label: D108
data_type: string
name: extract_symbolic_data
arguments: label: D121
data_type: string
name: extract_symbolic_data
arguments: label: D53
data_type: string

tool: {"D76": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x43]}

tool: D41: 0.5

tool: 

tool: D83: %*s-0

tool: D66: :%02d

tool: D44: :%02d.%1d

tool: D39: :%02d:%02d.%1d

tool: D69: :%02d:%02d.%02d

tool: D108: %*d

tool: D121: :%02d:%02d

tool: D53: fs_sexa: unknown fracbase: %d


assistant: ```c
int fs_sexa(char *out, double a, int w, int fracbase) {
  char *out0 = out;
  unsigned long n;
  int d;
  int f;
  int m;
  int s;
  int isneg;
  isneg = (a < 0);
  if (isneg)
    a = -a;
  n = (unsigned long)(a * fracbase + 0.5);
  d = n / fracbase;
  f = n % fracbase;
  if (isneg && d == 0)
    out += sprintf(out, "%*s-0", w - 2, "");
  else
    out += sprintf(out, "%*d", w, isneg ? -d : d);
  switch (fracbase) {
  case 60:
    m = f / (fracbase / 60);
    out += sprintf(out, ":%02d", m);
    break;
  case 600:
    out += sprintf(out, ":%02d.%1d", f / 10, f % 10);
    break;
  case 3600:
    m = f / (fracbase / 60);
    s = f % (fracbase / 60);
    out += sprintf(out, ":%02d:%02d", m, s);
    break;
  case 36000:
    m = f / (fracbase / 60);
    s = f % (fracbase / 60);
    out += sprintf(out, ":%02d:%02d.%1d", m, s / 10, s % 10);
    break;
  case 360000:
    m = f / (fracbase / 60);
    s = f % (fracbase / 60);
    out += sprintf(out, ":%02d:%02d.%02d", m, s / 100, s % 100);
    break;
  default:
    printf("fs_sexa: unknown fracbase: %d\n", fracbase);
    exit(1);
  }
  return (out - out0);
}
```