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

```asm
<isqrt>:
  endbr64
  mov    %edi,%eax
  cmp    $0x3fffffff,%edi
  jle    L75
  sub    $0x40000000,%eax
  mov    $0x10000000,%edx
  mov    $0x23ffffff,%esi
  mov    $0x20000000,%ecx
L53:
  cmp    %esi,%eax
  jle    L158
  add    $0x4000000,%ecx
  or     $0x4000000,%edx
  sub    %ecx,%eax
L158:
  mov    %edx,%ecx
  lea    0xffffff(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L157
  add    $0x1000000,%edx
  or     $0x1000000,%ecx
  sub    %edx,%eax
L157:
  mov    %ecx,%edx
  lea    0x3fffff(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L37
  add    $0x400000,%ecx
  or     $0x400000,%edx
  sub    %ecx,%eax
L37:
  mov    %edx,%ecx
  lea    0xfffff(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L120
  add    $0x100000,%edx
  or     $0x100000,%ecx
  sub    %edx,%eax
L120:
  mov    %ecx,%edx
  lea    0x3ffff(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L178
  add    $0x40000,%ecx
  or     $0x40000,%edx
  sub    %ecx,%eax
L178:
  mov    %edx,%ecx
  lea    0xffff(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L80
  add    $0x10000,%edx
  or     $0x10000,%ecx
  sub    %edx,%eax
L80:
  mov    %ecx,%edx
  lea    0x3fff(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L131
  add    $0x4000,%ecx
  or     $0x40,%dh
  sub    %ecx,%eax
L131:
  mov    %edx,%ecx
  lea    0xfff(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L59
  add    $0x1000,%edx
  or     $0x10,%ch
  sub    %edx,%eax
L59:
  mov    %ecx,%edx
  lea    0x3ff(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L49
  add    $0x400,%ecx
  or     $0x4,%dh
  sub    %ecx,%eax
L49:
  mov    %edx,%ecx
  lea    0xff(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L55
  add    $0x100,%edx
  or     $0x1,%ch
  sub    %edx,%eax
L55:
  mov    %ecx,%edx
  lea    0x3f(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L124
  add    $0x40,%ecx
  or     $0x40,%edx
  sub    %ecx,%eax
L124:
  mov    %edx,%ecx
  lea    0xf(%rdx),%esi
  sar    %ecx
  cmp    %eax,%esi
  jge    L51
  add    $0x10,%edx
  or     $0x10,%ecx
  sub    %edx,%eax
L51:
  mov    %ecx,%edx
  lea    0x3(%rcx),%esi
  sar    %edx
  cmp    %eax,%esi
  jge    L118
  add    $0x4,%ecx
  or     $0x4,%edx
  sub    %ecx,%eax
L118:
  mov    %edx,%r8d
  sar    %r8d
  cmp    %edx,%eax
  jle    L138
  add    $0x1,%edx
  or     $0x1,%r8d
  sub    %edx,%eax
L138:
  cmp    %r8d,%eax
  setg   %al
  movzbl %al,%eax
  add    %eax,%r8d
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax)
L75:
  cmp    $0xfffffff,%edi
  jle    L96
  sub    $0x10000000,%eax
  mov    $0x8000000,%edx
  mov    $0x13ffffff,%esi
  mov    $0x10000000,%ecx
  jmp    L53
L96:
  xor    %edx,%edx
  mov    $0x3ffffff,%esi
  xor    %ecx,%ecx
  jmp    L53
```

assistant: ```c
int isqrt(int value) {
  int root = 0;
  if ((0x40000000 >> 0) + root <= value) {
    value -= (0x40000000 >> 0) + root;
    root = (root >> 1) | (0x40000000 >> 0);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 2) + root <= value) {
    value -= (0x40000000 >> 2) + root;
    root = (root >> 1) | (0x40000000 >> 2);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 4) + root <= value) {
    value -= (0x40000000 >> 4) + root;
    root = (root >> 1) | (0x40000000 >> 4);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 6) + root <= value) {
    value -= (0x40000000 >> 6) + root;
    root = (root >> 1) | (0x40000000 >> 6);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 8) + root <= value) {
    value -= (0x40000000 >> 8) + root;
    root = (root >> 1) | (0x40000000 >> 8);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 10) + root <= value) {
    value -= (0x40000000 >> 10) + root;
    root = (root >> 1) | (0x40000000 >> 10);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 12) + root <= value) {
    value -= (0x40000000 >> 12) + root;
    root = (root >> 1) | (0x40000000 >> 12);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 14) + root <= value) {
    value -= (0x40000000 >> 14) + root;
    root = (root >> 1) | (0x40000000 >> 14);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 16) + root <= value) {
    value -= (0x40000000 >> 16) + root;
    root = (root >> 1) | (0x40000000 >> 16);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 18) + root <= value) {
    value -= (0x40000000 >> 18) + root;
    root = (root >> 1) | (0x40000000 >> 18);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 20) + root <= value) {
    value -= (0x40000000 >> 20) + root;
    root = (root >> 1) | (0x40000000 >> 20);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 22) + root <= value) {
    value -= (0x40000000 >> 22) + root;
    root = (root >> 1) | (0x40000000 >> 22);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 24) + root <= value) {
    value -= (0x40000000 >> 24) + root;
    root = (root >> 1) | (0x40000000 >> 24);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 26) + root <= value) {
    value -= (0x40000000 >> 26) + root;
    root = (root >> 1) | (0x40000000 >> 26);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 28) + root <= value) {
    value -= (0x40000000 >> 28) + root;
    root = (root >> 1) | (0x40000000 >> 28);
  } else {
    root >>= 1;
  };
  if ((0x40000000 >> 30) + root <= value) {
    value -= (0x40000000 >> 30) + root;
    root = (root >> 1) | (0x40000000 >> 30);
  } else {
    root >>= 1;
  };
  if (root < value)
    root++;
  return root;
}
```