user: What is the c source code of the assembly code below?

```asm
<myAtoi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movq   $0x0,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L190
L165:
  addq   $0x1,-0x28(%rbp)
L190:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L165
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L165
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L108
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L35
  movl   $0x1,-0x18(%rbp)
  jmp    L108
L35:
  mov    $0x0,%eax
  jmp    L102
L108:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L80
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L91
  movl   $0x0,-0x18(%rbp)
  jmp    L80
L91:
  mov    $0x0,%eax
  jmp    L102
L80:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L4
L2:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L169
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L182
  mov    -0x8(%rbp),%rax
  neg    %rax
  mov    %rax,%rcx
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  cltq
  cmp    %rax,%rcx
  jge    L20
  mov    D6(%rip),%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x8(%rbp)
  jmp    L49
L182:
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  sub    -0x14(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cltq
  cmp    %rax,-0x8(%rbp)
  jle    L20
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x8(%rbp)
  jmp    L49
L20:
  mov    -0x8(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  addq   $0x1,-0x10(%rbp)
L4:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L2
  jmp    L49
L169:
  nop
L49:
  cmpl   $0x0,-0x18(%rbp)
  je     L15
  mov    -0x8(%rbp),%rax
  neg    %eax
  jmp    L102
L15:
  mov    -0x8(%rbp),%rax
L102:
  leave
  ret
```

assistant: ```c
int myAtoi(char *str) {
  char *s;
  long n = 0;
  int sign = 0;
  while (*str == ' ' || *str == '\t') {
    str++;
  }
  if (*str == '-') {
    if (isdigit(*++str)) {
      sign = 1;
    } else {
      return 0;
    }
  }
  if (*str == '+') {
    if (isdigit(*++str)) {
      sign = 0;
    } else {
      return 0;
    }
  }
  for (s = str; *s != '\0'; s++) {
    if (isdigit(*s)) {
      int d = *s - '0';
      if (sign) {
        if (-n < (INT_MIN + d) / 10) {
          n = INT_MIN;
          break;
        }
      } else {
        if (n > (INT_MAX - d) / 10) {
          n = INT_MAX;
          break;
        }
      }
      n = n * 10 + d;
    } else {
      break;
    }
  }
  return sign ? -n : n;
}
```