user: Translate the below assembly code into C programming language:

```asm
<angle_fmt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %rdi,-0x40(%rbp)
  mov    %rsi,-0x48(%rbp)
  movsd  -0x38(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L74
  movb   $0x2b,-0x25(%rbp)
  jmp    L83
L74:
  movb   $0x2d,-0x25(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movq   D6(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L83:
  movsd  -0x38(%rbp),%xmm0
  movsd  D75(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x24(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  movsd  D75(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  D49(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x20(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  movsd  D75(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x20(%rbp),%xmm2
  movsd  D49(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffffb60b60b7,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x8,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x168,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x40(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L12
  movsd  D90(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L48
L12:
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x66,%al
  jne    L46
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  neg    %eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  mov    $0xa,%edi
  call   <pow@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D49(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L48
L46:
  movsd  D49(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
L48:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L70
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L70:
  mov    -0x40(%rbp),%rax
  lea    D97(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L75
  pxor   %xmm4,%xmm4
  cvtsi2sdl -0x20(%rbp),%xmm4
  movq   %xmm4,%rdi
  movsbl -0x25(%rbp),%edx
  movsd  -0x18(%rbp),%xmm0
  mov    -0x24(%rbp),%ecx
  mov    -0x40(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rdi,%xmm0
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <sprintf@plt>
  jmp    L39
L75:
  mov    -0x18(%rbp),%rdi
  mov    -0x20(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  movq   %rdi,%xmm0
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
L39:
  mov    -0x48(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D6
type_infered: f32[2]
name: extract_symbolic_data
arguments: data_label: D75
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D49
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D90
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D97
type_infered: string

tool: {"D6": [0.0,-0.0]}

tool: D75: 3600

tool: D49: 60

tool: D90: 59

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