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

```asm
<sqrti>:
  endbr64
  mov    %edi,%edx
  cmp    $0x3fffffff,%edi
  jle    L268
  sub    $0x40000000,%edx
  mov    $0xd0000000,%eax
L103:
  sub    %eax,%edx
  add    $0x10000000,%eax
  sar    %eax
  or     $0x4000000,%eax
  cmp    %eax,%edx
  jge    L193
L130:
  sub    $0x4000000,%eax
  sar    %eax
  or     $0x1000000,%eax
  cmp    %eax,%edx
  jge    L138
L255:
  sub    $0x1000000,%eax
  sar    %eax
  or     $0x400000,%eax
  cmp    %eax,%edx
  jge    L279
L69:
  sub    $0x400000,%eax
  sar    %eax
  or     $0x100000,%eax
  cmp    %eax,%edx
  jge    L224
L258:
  sub    $0x100000,%eax
  sar    %eax
  or     $0x40000,%eax
  cmp    %eax,%edx
  jge    L299
L194:
  sub    $0x40000,%eax
  sar    %eax
  or     $0x10000,%eax
  cmp    %eax,%edx
  jge    L10
L177:
  sub    $0x10000,%eax
  sar    %eax
  or     $0x40,%ah
  cmp    %eax,%edx
  jge    L196
L152:
  sub    $0x4000,%eax
  sar    %eax
  or     $0x10,%ah
  cmp    %eax,%edx
  jge    L97
L249:
  sub    $0x1000,%eax
  sar    %eax
  or     $0x4,%ah
  cmp    %eax,%edx
  jge    L248
L143:
  sub    $0x400,%eax
  sar    %eax
  or     $0x1,%ah
  cmp    %eax,%edx
  jge    L217
L137:
  sub    $0x100,%eax
  sar    %eax
  or     $0x40,%eax
  cmp    %eax,%edx
  jge    L242
L213:
  sub    $0x40,%eax
  sar    %eax
  or     $0x10,%eax
  cmp    %eax,%edx
  jge    L120
L229:
  sub    $0x10,%eax
  sar    %eax
  or     $0x4,%eax
  cmp    %eax,%edx
  jge    L105
L16:
  sub    $0x4,%eax
L49:
  sar    %eax
  or     $0x1,%eax
  lea    0x1(%rax),%esi
  cmp    %edx,%eax
  lea    -0x1(%rax),%ecx
  mov    %esi,%eax
  cmovg  %ecx,%eax
  sar    %eax
  ret
  nopl   0x0(%rax)
L268:
  cmp    $0xfffffff,%edi
  jg     L106
  xor    %eax,%eax
  sar    %eax
  or     $0x4000000,%eax
  cmp    %eax,%edx
  jl     L130
L193:
  sub    %eax,%edx
  add    $0x4000000,%eax
  sar    %eax
  or     $0x1000000,%eax
  cmp    %eax,%edx
  jl     L255
L138:
  sub    %eax,%edx
  add    $0x1000000,%eax
  sar    %eax
  or     $0x400000,%eax
  cmp    %eax,%edx
  jl     L69
L279:
  sub    %eax,%edx
  add    $0x400000,%eax
  sar    %eax
  or     $0x100000,%eax
  cmp    %eax,%edx
  jl     L258
L224:
  sub    %eax,%edx
  add    $0x100000,%eax
  sar    %eax
  or     $0x40000,%eax
  cmp    %eax,%edx
  jl     L194
L299:
  sub    %eax,%edx
  add    $0x40000,%eax
  sar    %eax
  or     $0x10000,%eax
  cmp    %eax,%edx
  jl     L177
L10:
  sub    %eax,%edx
  add    $0x10000,%eax
  sar    %eax
  or     $0x40,%ah
  cmp    %eax,%edx
  jl     L152
L196:
  sub    %eax,%edx
  add    $0x4000,%eax
  sar    %eax
  or     $0x10,%ah
  cmp    %eax,%edx
  jl     L249
L97:
  sub    %eax,%edx
  add    $0x1000,%eax
  sar    %eax
  or     $0x4,%ah
  cmp    %eax,%edx
  jl     L143
L248:
  sub    %eax,%edx
  add    $0x400,%eax
  sar    %eax
  or     $0x1,%ah
  cmp    %eax,%edx
  jl     L137
L217:
  sub    %eax,%edx
  add    $0x100,%eax
  sar    %eax
  or     $0x40,%eax
  cmp    %eax,%edx
  jl     L213
L242:
  sub    %eax,%edx
  add    $0x40,%eax
  sar    %eax
  or     $0x10,%eax
  cmp    %eax,%edx
  jl     L229
L120:
  sub    %eax,%edx
  add    $0x10,%eax
  sar    %eax
  or     $0x4,%eax
  cmp    %eax,%edx
  jl     L16
L105:
  sub    %eax,%edx
  add    $0x4,%eax
  jmp    L49
L106:
  mov    $0x10000000,%eax
  jmp    L103
```

assistant: ```c
int sqrti(int i) {
  int s = 0;
  int t = 1 << 30;
  while (t) {
    s |= t;
    if (s <= i) {
      i -= s;
      s += t;
    } else
      s -= t;
    s >>= 1;
    t >>= 2;
  }
  return (s);
}
```