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

```asm
<funcUpdateInvalidPort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x70(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,%r14
  mov    %r8,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    (%r8),%ecx
  mov    (%rdi),%edx
  cmp    %edx,%ecx
  jl     L47
  mov    $0x0,%eax
  cmp    (%rsi),%ecx
  jle    L96
L47:
  mov    %rsp,-0x80(%rbp)
  mov    (%rsi),%eax
  sub    %edx,%eax
  mov    %eax,-0x44(%rbp)
  lea    -0x44(%rbp),%rdi
  call   <funcLenInt@plt>
  mov    %eax,%r8d
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L63:
  cmp    %rdx,%rsp
  je     L119
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L63
L119:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L58
  orq    $0x0,-0x8(%rsp,%rax,1)
L58:
  mov    %rsp,%rdi
  mov    %r8d,%ecx
  sub    $0x1,%ecx
  js     L43
  mov    -0x44(%rbp),%edx
  movslq %ecx,%rcx
L76:
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  lea    (%rax,%rax,4),%esi
  add    %esi,%esi
  sub    %esi,%edx
  mov    %edx,(%rdi,%rcx,4)
  mov    %eax,%edx
  sub    $0x1,%rcx
  test   %ecx,%ecx
  jns    L76
  mov    %eax,-0x44(%rbp)
L43:
  test   %r8d,%r8d
  jle    L94
  mov    %rdi,%r13
  lea    -0x1(%r8),%eax
  lea    0x4(%rdi,%rax,4),%rax
  mov    %rax,-0x68(%rbp)
  mov    $0x0,%r15d
  lea    -0x3a(%rbp),%r12
L9:
  mov    %rsp,-0x60(%rbp)
  mov    0x0(%r13),%eax
  lea    0x1(%rax),%ebx
  mov    $0x2,%esi
  mov    %r12,%rdi
  call   <bzero@plt>
  mov    -0x58(%rbp),%rdi
  call   <strlen@plt>
  add    (%r14),%eax
  movslq %eax,%rsi
  add    -0x58(%rbp),%rsi
  mov    $0x1,%edx
  mov    %r12,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x39(%rbp)
  movl   $0x0,-0x40(%rbp)
  lea    -0x40(%rbp),%rsi
  mov    %r12,%rdi
  call   <funcHex2Int@plt>
  mov    -0x40(%rbp),%eax
  test   %eax,%eax
  js     L10
  mov    $0x2,%esi
  mov    %r12,%rdi
  call   <bzero@plt>
  lea    (%r15,%r15,4),%ecx
  mov    -0x40(%rbp),%eax
  cltd
  idiv   %ebx
  lea    (%rdx,%rcx,2),%r15d
  subl   $0x1,(%r14)
  mov    -0x60(%rbp),%rsp
  add    $0x4,%r13
  cmp    -0x68(%rbp),%r13
  jne    L9
L65:
  mov    -0x70(%rbp),%rax
  add    (%rax),%r15d
  mov    -0x78(%rbp),%rax
  mov    %r15d,(%rax)
  mov    -0x80(%rbp),%rsp
  mov    $0x0,%eax
L96:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L115
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L10:
  mov    -0x80(%rbp),%rsp
  jmp    L96
L94:
  mov    $0x0,%r15d
  jmp    L65
L115:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int funcUpdateInvalidPort(const int *piPortMin, const int *piPortMax, const char *pcHashOOR, int *piInitHashPos, int *piPort) {
  if ((*piPort < *piPortMin) || (*piPort > *piPortMax)) {
    int iPortDiff = *piPortMax - *piPortMin;
    int iLenPortDiff = funcLenInt(&iPortDiff);
    int iI;
    int iaPortDiff[iLenPortDiff];
    for (iI = (iLenPortDiff - 1); iI >= 0; iI--, iPortDiff /= 10) {
      iaPortDiff[iI] = iPortDiff % 10;
    }
    int iPort = 0;
    for (iI = 0; iI < iLenPortDiff; iI++) {
      int iDiffVal = iaPortDiff[iI] + 1;
      int iLenOffset = 1;
      char cOffset[iLenOffset + 1];
      bzero(cOffset, iLenOffset + 1);
      strncpy(cOffset, pcHashOOR + (strlen(pcHashOOR) + *piInitHashPos), 1);
      cOffset[iLenOffset] = '\0';
      int iOffset = 0;
      funcHex2Int(cOffset, &iOffset);
      if (iOffset < 0)
        return iOffset;
      bzero(cOffset, iLenOffset + 1);
      int iMod = iOffset % iDiffVal;
      iPort = (10 * iPort) + iMod;
      *piInitHashPos -= iLenOffset;
    }
    iPort += *piPortMin;
    *piPort = iPort;
  }
  return 0;
}
```