user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    D168(%rip),%rdi
  call   <puts@plt>
  lea    D88(%rip),%rdi
  call   <puts@plt>
  mov    %rsp,%rsi
  lea    D84(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L3
  lea    D161(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%ebx
L39:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L79
  mov    %ebx,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  ret
L3:
  mov    %eax,%ebx
  lea    0x8(%rsp),%rsi
  lea    D84(%rip),%rdi
  call   <scanf@plt>
  mov    %eax,%ebp
  cmp    $0x1,%eax
  je     L13
  lea    D161(%rip),%rdi
  call   <puts@plt>
  jmp    L39
L13:
  lea    D133(%rip),%rdi
  call   <puts@plt>
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D67(%rip),%rdi
  call   <puts@plt>
  lea    0x10(%rsp),%rsi
  lea    D84(%rip),%rdi
  call   <scanf@plt>
  mov    %eax,%ebx
  cmp    $0x1,%eax
  je     L52
  lea    D161(%rip),%rdi
  call   <puts@plt>
  mov    %ebp,%ebx
  jmp    L39
L52:
  lea    0x18(%rsp),%rsi
  lea    D84(%rip),%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L88
  lea    D161(%rip),%rdi
  call   <puts@plt>
  jmp    L39
L88:
  lea    0x38(%rsp),%rcx
  lea    0x30(%rsp),%rdx
  lea    0x28(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  movsd  D13(%rip),%xmm1
  movapd %xmm1,%xmm0
  mulsd  0x10(%rsp),%xmm0
  lea    0x40(%rsp),%r8
  mulsd  0x18(%rsp),%xmm1
  call   <exactE@plt>
  lea    D79(%rip),%rdi
  call   <puts@plt>
  movsd  0x30(%rsp),%xmm2
  movsd  D18(%rip),%xmm1
  mulsd  0x28(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm0
  lea    D191(%rip),%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  movsd  D18(%rip),%xmm0
  mulsd  0x38(%rsp),%xmm0
  movsd  D18(%rip),%xmm1
  mulsd  0x40(%rsp),%xmm1
  lea    D14(%rip),%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    $0x0,%ebx
  jmp    L39
L79:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D168
type_guessed: string
name: disassemble_data
arguments: label: D88
type_guessed: string
name: disassemble_data
arguments: label: D84
type_guessed: string
name: disassemble_data
arguments: label: D161
type_guessed: string
name: disassemble_data
arguments: label: D133
type_guessed: string
name: disassemble_data
arguments: label: D66
type_guessed: string
name: disassemble_data
arguments: label: D67
type_guessed: string
name: disassemble_data
arguments: label: D13
type_guessed: f64
name: disassemble_data
arguments: label: D79
type_guessed: string
name: disassemble_data
arguments: label: D18
type_guessed: f64
name: disassemble_data
arguments: label: D191
type_guessed: string
name: disassemble_data
arguments: label: D14
type_guessed: string

tool: D168: Enter  t  and  r  separated by space (or newline)

tool: D88:     (in yrs and km, resp.; e.g. 15000 500):

tool: D84: %lf

tool: D161: ... input error; exiting

tool: D133: exact test E also requires cartesian location ...

tool: D66: Enter  x  and  y  separated by space 

tool: D67: (in km; e.g. 400 200):

tool: D13: 1000

tool: D79: Results for Test E:

tool: D18: 31556926

tool: D191:     H = %12.6f (m)     M = %12.6f (m/a)    mu = %11.5e (m/(Pa s))


tool: D14:     u_b = %10.6f (m/a)   v_b = %10.6f (m/a)


assistant: ```c
int main() {
  const double SperA = 31556926.0;
  double year, r, x, y, HE, ME, muE, ubE, vbE;
  int scanret;
  printf("Enter  t  and  r  separated by space (or newline)\n");
  printf("    (in yrs and km, resp.; e.g. 15000 500):\n");
  scanret = scanf("%lf", &year);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  scanret = scanf("%lf", &r);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  printf("exact test E also requires cartesian location ...\n");
  printf("Enter  x  and  y  separated by space ");
  printf("(in km; e.g. 400 200):\n");
  scanret = scanf("%lf", &x);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  scanret = scanf("%lf", &y);
  if (scanret != 1) {
    printf("... input error; exiting\n");
    return 1;
  }
  exactE(x * 1000.0, y * 1000.0, &HE, &ME, &muE, &ubE, &vbE);
  printf("Results for Test E:\n");
  printf("    H = %12.6f (m)     M = %12.6f (m/a)    mu = %11.5e (m/(Pa s))\n", HE, ME * SperA, muE);
  printf("    u_b = %10.6f (m/a)   v_b = %10.6f (m/a)\n", ubE * SperA, vbE * SperA);
  return 0;
}
```