user: What is the c source code of the assembly code below?

```asm
<angle_fmt>:
  endbr64
  push   %r15
  push   %r14
  mov    $0x2b,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  sub    $0x20,%rsp
  comisd D7(%rip),%xmm0
  jae    L55
  xorpd  D71(%rip),%xmm0
  mov    $0x2d,%r14d
L55:
  movapd %xmm0,%xmm1
  pxor   %xmm3,%xmm3
  mov    $0x2e,%esi
  mov    %rbp,%rdi
  movsd  D4(%rip),%xmm2
  divsd  %xmm2,%xmm1
  cvttsd2si %xmm1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movslq %eax,%r12
  cltd
  imul   $0xffffffffb60b60b7,%r12,%r12
  mulsd  %xmm2,%xmm1
  movsd  D28(%rip),%xmm2
  shr    $0x20,%r12
  add    %eax,%r12d
  sar    $0x8,%r12d
  sub    %edx,%r12d
  imul   $0x168,%r12d,%edx
  subsd  %xmm1,%xmm0
  sub    %edx,%eax
  movapd %xmm0,%xmm1
  divsd  D28(%rip),%xmm1
  mov    %eax,%r12d
  cvttsd2si %xmm1,%r15d
  cvtsi2sd %r15d,%xmm3
  mulsd  %xmm3,%xmm2
  movsd  %xmm3,0x10(%rsp)
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <strchr@plt>
  movsd  D34(%rip),%xmm2
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  je     L56
  mov    D28(%rip),%rcx
  cmpb   $0x66,0x2(%rax)
  movq   %rcx,%xmm2
  je     L59
L56:
  minsd  %xmm1,%xmm2
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm2,0x8(%rsp)
  call   <strstr@plt>
  movsd  0x8(%rsp),%xmm1
  test   %rax,%rax
  je     L39
  movsd  0x10(%rsp),%xmm0
  mov    %r12d,%ecx
  mov    %r14d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    $0x2,%eax
  call   <sprintf@plt>
L24:
  add    $0x20,%rsp
  mov    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L39:
  movapd %xmm1,%xmm0
  mov    %r15d,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
  jmp    L24
  nopl   0x0(%rax)
L59:
  movsbl 0x1(%rax),%edx
  mov    $0x30,%eax
  pxor   %xmm0,%xmm0
  mov    $0xa,%edi
  mov    %rcx,0x18(%rsp)
  sub    %edx,%eax
  cvtsi2sd %eax,%xmm0
  call   <pow@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  subsd  %xmm0,%xmm2
  jmp    L56
```

tool_calls: name: read_data
arguments: data_label: D7
type: f64
name: read_data
arguments: data_label: D71
type: byte[16]
name: read_data
arguments: data_label: D4
type: f64
name: read_data
arguments: data_label: D28
type: f64
name: read_data
arguments: data_label: D34
type: f64
name: read_data
arguments: data_label: D11
type: string

tool: D7: 0

tool: {"D71": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D4: 3600

tool: D28: 60

tool: D34: 59

tool: D11: %c

assistant: ```c
char *angle_fmt(double a, char *format, char *lin) {
  char s, *p;
  int d, min, n;
  double sec, msec;
  if (a >= 0.)
    s = '+';
  else {
    s = '-';
    a = -a;
  }
  d = (int)(a / 3600.);
  min = (int)((a - (double)d * 3600.) / 60.);
  sec = a - (double)d * 3600. - (double)min * 60.;
  d %= 360;
  if ((p = strchr(format, '.')) == NULL)
    msec = 59.;
  else if (*(p + 2) == 'f') {
    n = *(p + 1) - '0';
    msec = 60. - pow(10., (double)(-n));
  } else
    msec = 60.;
  if (sec > msec)
    sec = msec;
  if (strstr(format, "%c"))
    sprintf(lin, format, s, d, min, sec);
  else
    sprintf(lin, format, d, min, sec);
  return lin;
}
```