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

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  lea    D112(%rip),%rbx
  mov    %rbx,%rdi
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%rbp
  mov    %rbp,%rsi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L79
  nopw   0x0(%rax,%rax,1)
L7:
  movsd  0x40(%rsp),%xmm4
  ucomisd D162(%rip),%xmm4
  jp     L41
  je     L79
L41:
  movsd  D37(%rip),%xmm6
  movsd  D121(%rip),%xmm5
  movsd  D46(%rip),%xmm2
  movsd  D37(%rip),%xmm7
  mulsd  %xmm4,%xmm6
  movsd  D121(%rip),%xmm3
  mulsd  %xmm4,%xmm5
  divsd  D174(%rip),%xmm6
  subsd  %xmm6,%xmm7
  movapd %xmm6,%xmm1
  mulsd  D46(%rip),%xmm4
  divsd  D174(%rip),%xmm5
  subsd  %xmm5,%xmm3
  movapd %xmm5,%xmm0
  divsd  D174(%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   <max1@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <min1@plt>
  pxor   %xmm5,%xmm5
  movsd  D39(%rip),%xmm7
  comisd 0x18(%rsp),%xmm7
  movsd  %xmm5,0x38(%rsp)
  movsd  0x28(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm4
  jae    L143
  jmp    L138
  nopw   0x0(%rax,%rax,1)
L106:
  movapd %xmm4,%xmm2
  movapd %xmm6,%xmm1
  movapd %xmm5,%xmm0
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  call   <max1@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <min1@plt>
  movsd  0x18(%rsp),%xmm3
  mov    D39(%rip),%rax
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm6
  comisd %xmm3,%xmm0
  movsd  0x30(%rsp),%xmm4
  movq   %rax,%xmm7
  jbe    L105
  movapd %xmm0,%xmm1
  subsd  %xmm3,%xmm1
  addsd  0x38(%rsp),%xmm1
  movsd  %xmm1,0x38(%rsp)
L105:
  movsd  (%rsp),%xmm2
  ucomisd %xmm2,%xmm0
  jp     L154
  jne    L154
  movsd  D37(%rip),%xmm1
  addsd  D37(%rip),%xmm6
  addsd  %xmm2,%xmm1
  movsd  %xmm1,(%rsp)
L154:
  movsd  0x8(%rsp),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L113
  jne    L113
  movsd  D121(%rip),%xmm2
  addsd  D121(%rip),%xmm5
  addsd  %xmm1,%xmm2
  movsd  %xmm2,0x8(%rsp)
L113:
  movsd  0x10(%rsp),%xmm2
  ucomisd %xmm2,%xmm0
  jp     L158
  jne    L158
  movsd  D46(%rip),%xmm1
  addsd  D46(%rip),%xmm4
  addsd  %xmm2,%xmm1
  movsd  %xmm1,0x10(%rsp)
L158:
  comisd %xmm3,%xmm7
  jb     L138
L143:
  comisd %xmm0,%xmm7
  jae    L106
L138:
  lea    D98(%rip),%rdi
  movsd  0x38(%rsp),%xmm0
  divsd  D12(%rip),%xmm0
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L7
L79:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L145
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
L145:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D112
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D162
type_guessed: f32[2]
name: extract_symbolic_data
arguments: data_label: D37
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D121
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D46
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D174
type_guessed: f32[2]
name: extract_symbolic_data
arguments: data_label: D39
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D98
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D12
type_guessed: f32[2]

tool: D112: %lf

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

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

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

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

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

tool: D39: 43200

tool: D98: %.3lf


tool: {"D12": [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) {
    sum = 0;
    dsm = sm * d / 360;
    dsh = sh * d / 360;
    dmh = mh * d / 360;
    bsm = sm - dsm;
    bsh = sh - dsh;
    bmh = mh - dmh;
    tempx = max1(dsh, dsm, dmh);
    tempy = min1(bsh, bsm, bmh);
    while (tempx <= 43200 && tempy <= 43200) {
      tempx = max1(dsh, dsm, dmh);
      tempy = min1(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\n", sum / 432);
  }
  return 0;
}
```