user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  pxor   %xmm7,%xmm7
  push   %rbx
  lea    D72(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rbp
  movsd  %xmm7,0x38(%rsp)
  mov    %rbp,%rsi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L66
  nopl   0x0(%rax)
L101:
  movsd  0x40(%rsp),%xmm4
  ucomisd D96(%rip),%xmm4
  jp     L81
  je     L66
L81:
  movsd  D201(%rip),%xmm6
  movsd  D111(%rip),%xmm5
  movsd  D160(%rip),%xmm2
  movsd  D201(%rip),%xmm7
  mulsd  %xmm4,%xmm6
  movsd  D111(%rip),%xmm3
  mulsd  %xmm4,%xmm5
  divsd  D185(%rip),%xmm6
  subsd  %xmm6,%xmm7
  movapd %xmm6,%xmm1
  mulsd  D160(%rip),%xmm4
  divsd  D185(%rip),%xmm5
  subsd  %xmm5,%xmm3
  movapd %xmm5,%xmm0
  divsd  D185(%rip),%xmm4
  subsd  %xmm4,%xmm2
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm7,(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movapd %xmm4,%xmm2
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   <max@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <min@plt>
  movsd  D104(%rip),%xmm7
  comisd 0x18(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm6
  movsd  0x30(%rsp),%xmm4
  jae    L42
  jmp    L51
  nopl   (%rax)
L85:
  movapd %xmm4,%xmm2
  movapd %xmm6,%xmm1
  movapd %xmm5,%xmm0
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  call   <max@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <min@plt>
  movsd  0x18(%rsp),%xmm3
  mov    D104(%rip),%rax
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm6
  comisd %xmm3,%xmm0
  movsd  0x30(%rsp),%xmm4
  movq   %rax,%xmm7
  jbe    L136
  movapd %xmm0,%xmm1
  subsd  %xmm3,%xmm1
  addsd  0x38(%rsp),%xmm1
  movsd  %xmm1,0x38(%rsp)
L136:
  movsd  (%rsp),%xmm2
  ucomisd %xmm2,%xmm0
  jp     L91
  jne    L91
  movsd  D201(%rip),%xmm1
  addsd  D201(%rip),%xmm6
  addsd  %xmm2,%xmm1
  movsd  %xmm1,(%rsp)
L91:
  movsd  0x8(%rsp),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L151
  jne    L151
  movsd  D111(%rip),%xmm2
  addsd  D111(%rip),%xmm5
  addsd  %xmm1,%xmm2
  movsd  %xmm2,0x8(%rsp)
L151:
  movsd  0x10(%rsp),%xmm2
  ucomisd %xmm2,%xmm0
  jp     L31
  jne    L31
  movsd  D160(%rip),%xmm1
  addsd  D160(%rip),%xmm4
  addsd  %xmm2,%xmm1
  movsd  %xmm1,0x10(%rsp)
L31:
  comisd %xmm3,%xmm7
  jb     L51
L42:
  comisd %xmm0,%xmm7
  jae    L85
L51:
  lea    D33(%rip),%rdi
  movsd  0x38(%rsp),%xmm0
  divsd  D187(%rip),%xmm0
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L101
L66:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D72
datatype: string
name: read_data
arguments: data_tag: D96
datatype: f32[2]
name: read_data
arguments: data_tag: D201
datatype: byte[8]
name: read_data
arguments: data_tag: D111
datatype: byte[8]
name: read_data
arguments: data_tag: D160
datatype: byte[8]
name: read_data
arguments: data_tag: D185
datatype: f32[2]
name: read_data
arguments: data_tag: D104
datatype: f64
name: read_data
arguments: data_tag: D33
datatype: string
name: read_data
arguments: data_tag: D187
datatype: f32[2]

tool: D72: %lf

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

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

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

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

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

tool: D104: 43200

tool: D33: %.3lf

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

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;
}
```