user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r14
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x38(%rsp)
  lea    D38(%rip),%rbx
  jmp    L30
L53:
  movsd  D145(%rip),%xmm1
  comisd (%rsp),%xmm1
  jb     L138
L64:
  movsd  D145(%rip),%xmm4
  comisd %xmm0,%xmm4
  jb     L138
  movsd  0x30(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm0
  call   <max@plt>
  movsd  %xmm0,(%rsp)
  movsd  0x18(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <min@plt>
  movsd  (%rsp),%xmm3
  comisd %xmm3,%xmm0
  jbe    L16
  movapd %xmm0,%xmm1
  subsd  %xmm3,%xmm1
  addsd  0x38(%rsp),%xmm1
  movsd  %xmm1,0x38(%rsp)
L16:
  movsd  0x8(%rsp),%xmm5
  ucomisd %xmm5,%xmm0
  jp     L62
  jne    L62
  movsd  0x20(%rsp),%xmm2
  addsd  D29(%rip),%xmm2
  movsd  %xmm2,0x20(%rsp)
  addsd  D29(%rip),%xmm5
  movsd  %xmm5,0x8(%rsp)
L62:
  movsd  0x10(%rsp),%xmm6
  ucomisd %xmm6,%xmm0
  jp     L160
  jne    L160
  movsd  0x28(%rsp),%xmm4
  addsd  D42(%rip),%xmm4
  movsd  %xmm4,0x28(%rsp)
  addsd  D42(%rip),%xmm6
  movsd  %xmm6,0x10(%rsp)
L160:
  movsd  0x18(%rsp),%xmm7
  ucomisd %xmm7,%xmm0
  jp     L53
  jne    L53
  movsd  0x30(%rsp),%xmm2
  addsd  D68(%rip),%xmm2
  movsd  %xmm2,0x30(%rsp)
  addsd  D68(%rip),%xmm7
  movsd  %xmm7,0x18(%rsp)
  jmp    L53
L138:
  movsd  0x38(%rsp),%xmm0
  divsd  D49(%rip),%xmm0
  lea    D20(%rip),%rdi
  call   <printf@plt>
L30:
  lea    0x40(%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L68
  movsd  0x40(%rsp),%xmm0
  ucomisd D64(%rip),%xmm0
  jp     L69
  je     L68
L69:
  movsd  D29(%rip),%xmm4
  movapd %xmm0,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  D165(%rip),%xmm1
  divsd  %xmm1,%xmm2
  movapd %xmm2,%xmm5
  movsd  %xmm2,0x20(%rsp)
  movsd  D42(%rip),%xmm3
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  divsd  %xmm1,%xmm2
  movapd %xmm2,%xmm6
  movsd  %xmm2,0x28(%rsp)
  movsd  D68(%rip),%xmm2
  mulsd  %xmm2,%xmm0
  movapd %xmm0,%xmm7
  divsd  %xmm1,%xmm7
  movsd  %xmm7,0x30(%rsp)
  movapd %xmm5,%xmm1
  subsd  %xmm5,%xmm4
  movsd  %xmm4,0x8(%rsp)
  subsd  %xmm6,%xmm3
  movsd  %xmm3,0x10(%rsp)
  subsd  %xmm7,%xmm2
  movsd  %xmm2,0x18(%rsp)
  movapd %xmm7,%xmm2
  movapd %xmm6,%xmm0
  call   <max@plt>
  movq   %xmm0,%r14
  movsd  0x18(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <min@plt>
  movsd  D145(%rip),%xmm1
  movq   %r14,%xmm4
  comisd %xmm4,%xmm1
  jae    L64
  jmp    L138
L68:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L98
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %r14
  ret
L98:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D38
type_guessed: string
name: retrieve_data
arguments: data_tag: D145
type_guessed: f64
name: retrieve_data
arguments: data_tag: D29
type_guessed: byte[8]
name: retrieve_data
arguments: data_tag: D42
type_guessed: byte[8]
name: retrieve_data
arguments: data_tag: D68
type_guessed: byte[8]
name: retrieve_data
arguments: data_tag: D49
type_guessed: f32[2]
name: retrieve_data
arguments: data_tag: D20
type_guessed: string
name: retrieve_data
arguments: data_tag: D64
type_guessed: f32[2]
name: retrieve_data
arguments: data_tag: D165
type_guessed: f32[2]

tool: D38: %lf

tool: D145: 43200

tool: {"D29": [0xa5,0xee,0xcb,0x63,0x2b,0x82,0x4e,0x40]}

tool: {"D42": [0x84,0xb4,0xeb,0x76,0xae,0x0a,0x4e,0x40]}

tool: {"D68": [0x2f,0xba,0xe8,0xa2,0x8b,0xae,0xae,0x40]}

tool: {"D49": [0.0,3.921875]}

tool: D20: %.3lf

tool: {"D64": [0.0,-1.875]}

tool: {"D165": [0.0,3.8515625]}

assistant: ```c
int main(int argc, char *argv[]) {
  double sum = 0.0;
  double tempx = 0.0;
  double tempy = 0.0;
  double sm;
  double sh;
  double mh;
  double dsm;
  double dsh;
  double dmh;
  double bsm, bsh, bmh;
  double d;
  sm = 3600.0 / 59;
  sh = 43200.0 / 719;
  mh = 43200.0 / 11;
  while (scanf("%lf", &d) == 1 && d != -1) {
    dsm = sm * d / 360;
    dsh = sh * d / 360;
    dmh = mh * d / 360;
    bsm = sm - dsm;
    bsh = sh - dsh;
    bmh = mh - dmh;
    tempx = max(dsh, dsm, dmh);
    tempy = min(bsh, bsm, bmh);
    while (tempx <= 43200 && tempy <= 43200) {
      tempx = max(dsh, dsm, dmh);
      tempy = min(bsh, bsm, bmh);
      if (tempx < tempy) {
        sum += tempy - tempx;
      }
      if (tempy == bsm) {
        dsm += sm;
        bsm += sm;
      }
      if (tempy == bsh) {
        dsh += sh;
        bsh += sh;
      }
      if (tempy == bmh) {
        dmh += mh;
        bmh += mh;
      }
    }
    printf("%.3lf", sum / 432);
  }
  return 0;
}
```