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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D161(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L139
  jmp    L59
L39:
  movsd  -0x20(%rbp),%xmm0
  movsd  D43(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L59:
  movsd  -0x20(%rbp),%xmm0
  comisd D43(%rip),%xmm0
  jae    L39
  jmp    L11
L62:
  movsd  -0x20(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L11:
  movsd  -0x20(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  ja     L62
  movsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L5
  movsd  -0x20(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L5
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L47
L5:
  movsd  -0x20(%rbp),%xmm0
  comisd D3(%rip),%xmm0
  jb     L26
  movsd  -0x20(%rbp),%xmm1
  movsd  D156(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L26
  movsd  -0x20(%rbp),%xmm1
  movsd  D156(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L47
L26:
  movsd  -0x20(%rbp),%xmm0
  comisd D156(%rip),%xmm0
  jb     L143
  movsd  -0x20(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L143
  movsd  -0x20(%rbp),%xmm1
  movsd  D156(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L47
L143:
  movsd  -0x20(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L47
  movsd  -0x20(%rbp),%xmm0
  movsd  D43(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L47:
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sine@plt>
  mov    %eax,%esi
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <cosine@plt>
  mov    %eax,%esi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L139:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L44
  call   <__stack_chk_fail@plt>
L44:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D161
type_infered: string
name: disassemble_data
arguments: label: D43
type_infered: byte[16]
name: disassemble_data
arguments: label: D3
type_infered: f64[2]
name: disassemble_data
arguments: label: D156
type_infered: f64[2]
name: disassemble_data
arguments: label: D49
type_infered: byte[8]
name: disassemble_data
arguments: label: D104
type_infered: string
name: disassemble_data
arguments: label: D65
type_infered: string

tool: D161: %lf

tool: {"D43": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40,0x18,0x2d,0x44,0x54,0xfb,0x21,0xf9,0x3f]}

tool: {"D3": [1.5707963267948966,3.141592653589793]}

tool: {"D156": [3.141592653589793,4.71238898038469]}

tool: {"D49": [0xd2,0x21,0x33,0x7f,0x7c,0xd9,0x12,0x40]}

tool: D104: sin = %.6lf


tool: D65: cos = %.6lf


assistant: ```c
int main() {
  double x;
  double s, c;
  if (scanf("%lf", &x) == 1) {
    while (x >= 2 * 3.14159265358979323846)
      x -= 2 * 3.14159265358979323846;
    while (x < 0)
      x += 2 * 3.14159265358979323846;
    if (0 <= x && x < 1.57079632679489661923)
      s = x, c = x;
    else if (1.57079632679489661923 <= x && x < 3.14159265358979323846)
      s = 3.14159265358979323846 - x, c = x;
    else if (3.14159265358979323846 <= x && x < 3.14159265358979323846 + 1.57079632679489661923)
      s = 3.14159265358979323846 - x, c = 2 * 3.14159265358979323846 - x;
    else if (3.14159265358979323846 <= 3.14159265358979323846 + 1.57079632679489661923 && x < 2 * 3.14159265358979323846)
      s = x - 2 * 3.14159265358979323846, c = 2 * 3.14159265358979323846 - x;
    printf("sin = %.6lf\n", sine(s));
    printf("cos = %.6lf\n", cosine(c));
  }
  return 0;
}
```