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

```asm
<SPITransfer32>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x1,-0x30(%rbp)
  movq   $0x1,-0x28(%rbp)
  mov    -0x60(%rbp),%rax
  and    $0x3,%eax
  test   %rax,%rax
  je     L47
  mov    $0xffffffffffffffff,%rax
  jmp    L46
L47:
  mov    -0x60(%rbp),%rax
  shr    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  jne    L35
  movq   $0x0,-0x30(%rbp)
  mov    $0xffffffff,%eax
  mov    %rax,-0x40(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0x50(%rbp)
L35:
  cmpq   $0x0,-0x58(%rbp)
  jne    L102
  movq   $0x0,-0x28(%rbp)
  lea    -0x38(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L102:
  mov    -0x48(%rbp),%rax
  add    $0x13c,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x138,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x130,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x68(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L87
  mov    -0x48(%rbp),%rax
  add    $0x12c,%rax
  mov    (%rax),%rax
  mov    -0x48(%rbp),%rdx
  add    $0x12c,%rdx
  or     $0x100000,%rax
  mov    %rax,(%rdx)
  jmp    L87
L82:
  nop
L28:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  and    $0x2,%eax
  test   %rax,%rax
  je     L28
  mov    -0x18(%rbp),%rax
  mov    -0x50(%rbp),%rdx
  mov    (%rdx),%rdx
  mov    %rdx,(%rax)
  nop
L67:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L67
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x50(%rbp)
  mov    -0x28(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x58(%rbp)
  subq   $0x1,-0x60(%rbp)
L87:
  cmpq   $0x0,-0x60(%rbp)
  jne    L82
  mov    -0x68(%rbp),%rax
  and    $0x2,%eax
  test   %rax,%rax
  je     L93
  mov    -0x48(%rbp),%rax
  add    $0x12c,%rax
  mov    (%rax),%rax
  mov    -0x48(%rbp),%rdx
  add    $0x12c,%rdx
  and    $0xffffffffffefffff,%rax
  mov    %rax,(%rdx)
L93:
  mov    $0x0,%eax
L46:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L96
  call   <__stack_chk_fail@plt>
L96:
  leave
  ret
```

assistant: ```c
long SPITransfer32(unsigned long ulBase, unsigned long *ulDout, unsigned long *ulDin, unsigned long ulCount, unsigned long ulFlags) {
  unsigned long ulReadReg;
  unsigned long ulWriteReg;
  unsigned long ulStatReg;
  unsigned long ulOutIncr;
  unsigned long ulInIncr;
  unsigned long ulTxDummy;
  unsigned long ulRxDummy;
  ulOutIncr = 1;
  ulInIncr = 1;
  if (ulCount % 4) {
    return -1;
  }
  ulCount = ulCount / 4;
  if (ulDout == 0) {
    ulOutIncr = 0;
    ulTxDummy = 0xFFFFFFFF;
    ulDout = &ulTxDummy;
  }
  if (ulDin == 0) {
    ulInIncr = 0;
    ulDin = &ulRxDummy;
  }
  ulReadReg = (ulBase + 0x0000013C);
  ulWriteReg = (ulBase + 0x00000138);
  ulStatReg = (ulBase + 0x00000130);
  if (ulFlags & 0x00000001) {
    (*((volatile unsigned long *)(ulBase + 0x0000012C))) |= 0x00100000;
  }
  while (ulCount) {
    while (!((*((volatile unsigned long *)(ulStatReg))) & 0x00000002)) {
    }
    (*((volatile unsigned long *)(ulWriteReg))) = *ulDout;
    while (!((*((volatile unsigned long *)(ulStatReg))) & 0x00000001)) {
    }
    *ulDin = (*((volatile unsigned long *)(ulReadReg)));
    ulDout = ulDout + ulOutIncr;
    ulDin = ulDin + ulInIncr;
    ulCount--;
  }
  if (ulFlags & 0x00000002) {
    (*((volatile unsigned long *)(ulBase + 0x0000012C))) &= ~0x00100000;
  }
  return 0;
}
```