user: What would the C source look like for the assembly code provided here:

```asm
<inv_fast_sqrt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x58(%rbp),%rax
  test   %rax,%rax
  jg     L50
  mov    $0x0,%eax
  jmp    L75
L50:
  movq   $0x5a82799a,-0x38(%rbp)
  movq   $0x2d413ccd,-0x30(%rbp)
  movq   $0x60000000,-0x28(%rbp)
  lea    -0x4c(%rbp),%rdx
  lea    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <test_limits_and_scale@plt>
  mov    %eax,-0x44(%rbp)
  movl   $0x0,-0x48(%rbp)
  mov    -0x4c(%rbp),%eax
  test   %eax,%eax
  jle    L22
  mov    -0x4c(%rbp),%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  mov    %eax,-0x48(%rbp)
L22:
  mov    -0x4c(%rbp),%eax
  sub    -0x48(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x58(%rbp),%rax
  sub    $0x40000000,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rbx
  mov    -0x58(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  sar    %eax
  movslq %eax,%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  mov    %rax,-0x40(%rbp)
  cmpl   $0x1,-0x44(%rbp)
  jle    L5
  mov    -0x20(%rbp),%rax
  sar    %rax
  sub    -0x28(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  sar    %eax
  cltq
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  sar    %eax
  cltq
  sub    %rax,-0x40(%rbp)
  cmpl   $0x3,-0x44(%rbp)
  jne    L5
  mov    -0x20(%rbp),%rax
  sar    %rax
  sub    -0x28(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  sar    %eax
  cltq
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  sar    %eax
  cltq
  sub    %rax,-0x40(%rbp)
L5:
  cmpl   $0x0,-0x48(%rbp)
  je     L4
  mov    -0x30(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  cltq
  mov    %rax,-0x40(%rbp)
L4:
  mov    -0x4c(%rbp),%eax
  test   %eax,%eax
  jle    L30
  mov    -0x4c(%rbp),%eax
  sar    %eax
  mov    %eax,%ecx
  sarq   %cl,-0x40(%rbp)
  jmp    L78
L30:
  mov    -0x4c(%rbp),%eax
  cmp    $0xffffffff,%eax
  jne    L78
  mov    -0x38(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <inv_q30_mult@plt>
  cltq
  mov    %rax,-0x40(%rbp)
L78:
  mov    -0x40(%rbp),%rax
L75:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L55
  call   <__stack_chk_fail@plt>
L55:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
long inv_fast_sqrt(long x0) {
  long sqrt2, oneoversqrt2, one_pt5;
  long xx, cc;
  int pow2, sq2scale, nr_iters;
  if (x0 <= 0L) {
    return 0L;
  }
  sqrt2 = 1518500250L;
  oneoversqrt2 = 759250125L;
  one_pt5 = 1610612736L;
  nr_iters = test_limits_and_scale(&x0, &pow2);
  sq2scale = 0;
  if (pow2 > 0)
    sq2scale = pow2 % 2;
  pow2 = pow2 - sq2scale;
  cc = x0 - (1L << 30);
  xx = x0 - (inv_q30_mult(x0, cc) >> 1);
  if (nr_iters >= 2) {
    cc = inv_q30_mult(cc, inv_q30_mult(cc, (cc >> 1) - one_pt5)) >> 1;
    xx = xx - (inv_q30_mult(xx, cc) >> 1);
    if (nr_iters == 3) {
      cc = inv_q30_mult(cc, inv_q30_mult(cc, (cc >> 1) - one_pt5)) >> 1;
      xx = xx - (inv_q30_mult(xx, cc) >> 1);
    }
  }
  if (sq2scale)
    xx = inv_q30_mult(xx, oneoversqrt2);
  if (pow2 > 0)
    xx = (xx >> (pow2 >> 1));
  else if (pow2 == -1)
    xx = inv_q30_mult(xx, sqrt2);
  return xx;
}
```