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

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movsd  D48(%rip),%xmm0
  lea    D128(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    0x8(%rsp),%rsi
  lea    D114(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L49
  lea    D70(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%ebx
L31:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  mov    %ebx,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  ret
L49:
  mov    %eax,%ebx
  lea    0x28(%rsp),%rcx
  lea    0x20(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  lea    0x10(%rsp),%rdi
  movsd  D110(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    $0x1,%r9d
  movsd  D59(%rip),%xmm2
  movsd  D104(%rip),%xmm1
  lea    0x30(%rsp),%r8
  call   <exactP@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jne    L12
  lea    D95(%rip),%rdi
  call   <puts@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  D94(%rip),%xmm6
  movapd %xmm0,%xmm1
  mulsd  D125(%rip),%xmm1
  movsd  0x30(%rsp),%xmm5
  divsd  %xmm6,%xmm5
  movsd  0x28(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm3
  movsd  D31(%rip),%xmm2
  mulsd  0x18(%rsp),%xmm2
  divsd  %xmm6,%xmm1
  lea    D37(%rip),%rdi
  mov    $0x6,%eax
  call   <printf@plt>
  mov    %ebp,%ebx
  jmp    L31
L12:
  lea    D57(%rip),%rdi
  call   <puts@plt>
  mov    %ebp,%edi
  call   <error_message_testP@plt>
  jmp    L31
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D48
type_infered: byte[8]
name: retrieve_data
arguments: tag: D128
type_infered: string
name: retrieve_data
arguments: tag: D114
type_infered: string
name: retrieve_data
arguments: tag: D70
type_infered: string
name: retrieve_data
arguments: tag: D110
type_infered: f64
name: retrieve_data
arguments: tag: D59
type_infered: byte[8]
name: retrieve_data
arguments: tag: D104
type_infered: byte[8]
name: retrieve_data
arguments: tag: D95
type_infered: string
name: retrieve_data
arguments: tag: D94
type_infered: f64
name: retrieve_data
arguments: tag: D125
type_infered: byte[8]
name: retrieve_data
arguments: tag: D31
type_infered: f64
name: retrieve_data
arguments: tag: D37
type_infered: string
name: retrieve_data
arguments: tag: D57
type_infered: string

tool: {"D48": [0x00,0x00,0x00,0x00,0x00,0x80,0x36,0x40]}

tool: D128: Enter  r  (in km; 0 <= r <= TESTP_L = %.1f):   

tool: D114: %lf

tool: D70: ... input error; exiting

tool: D110: 1000

tool: {"D59": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

tool: {"D104": [0x11,0xea,0x2d,0x81,0x99,0x97,0x71,0x3d]}

tool: D95: Results from Test P:

tool: D94: 100000

tool: {"D125": [0xcd,0xcc,0xcc,0xcc,0x8c,0x6f,0xc1,0x40]}

tool: D31: 31556926

tool: D37:     h = %.4f (m)  Po = %.7f (bar)  |vb| = %.5f (m/year)
    W_c = %.8f (m)  W = %.8f (m)  P = %.7f (bar)


tool: D57: 

simpleP ENDING because of ERROR from exactP():

assistant: ```c
int main() {
  double r, h, magvb, Wcrit, W, P;
  int scanret, ierr;
  const double secpera = 31556926.0;
  double EPS_ABS[] = {1.0e-12, 1.0e-9, 1.0e-7};
  double EPS_REL[] = {1.0e-15, 1.0e-14, 1.0e-11};
  printf("Enter  r  (in km; 0 <= r <= TESTP_L = %.1f):   ", 0.9 * 25000.0 / 1000.0);
  scanret = scanf("%lf", &r);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  ierr = exactP(r * 1000.0, &h, &magvb, &Wcrit, &W, &P, EPS_ABS[0], EPS_REL[0], 1);
  if (ierr) {
    printf("\n\nsimpleP ENDING because of ERROR from exactP():\n");
    error_message_testP(ierr);
    return 1;
  }
  printf("Results from Test P:\n");
  printf("    h = %.4f (m)  Po = %.7f (bar)  |vb| = %.5f (m/year)\n"
         "    W_c = %.8f (m)  W = %.8f (m)  P = %.7f (bar)\n",
         h, 910.0 * 9.81 * h / 1.0e5, magvb * secpera, Wcrit, W, P / 1.0e5);
  return 0;
}
```