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

```asm
<UARTRecv>:
  endbr64
  push   %r15
  mov    %ecx,%eax
  lea    D9(%rip),%r15
  movzbl %dil,%edi
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x18,%rsp
  movslq D68(%rip),%rsi
  mov    0x58(%rsp),%r14d
  sub    %esi,%eax
  add    %r15,%rsi
  lea    0x4(%rax),%edx
  test   %r8b,%r8b
  je     L63
  mov    %r9d,%ecx
  call   <mdaq_uart_read@plt>
  mov    %eax,%r13d
  test   %r14b,%r14b
  je     L84
L179:
  test   %r13d,%r13d
  jle    L84
  mov    D68(%rip),%edi
  mov    D41(%rip),%eax
  test   %edi,%edi
  jne    L0
L174:
  movslq %edi,%r8
  xor    %edx,%edx
  lea    (%r15,%r8,1),%rcx
  jmp    L93
L94:
  xor    %eax,%eax
L156:
  add    $0x1,%edx
  add    $0x1,%rcx
  cmp    %r13d,%edx
  je     L1
L93:
  movslq %eax,%rsi
  movzbl 0x50(%rsp,%rsi,1),%esi
  cmp    %sil,(%rcx)
  jne    L94
  add    $0x1,%eax
  cmp    $0x4,%eax
  jne    L156
  lea    0x1(%rdx),%r14d
  mov    %r13d,%ecx
  mov    $0x200,%edx
  movl   $0x4,D41(%rip)
  sub    %r14d,%ecx
  movslq %r14d,%rsi
  cmp    %edx,%ecx
  cmovle %ecx,%edx
  add    %r13d,%edi
  add    %r8,%rsi
  sub    %r14d,%edi
  add    %r15,%rsi
  cmp    %ebx,%edi
  je     L123
  mov    %r15,%rdi
  mov    %ecx,0xc(%rsp)
  call   <memmove@plt>
  mov    0xc(%rsp),%ecx
  movl   $0xffffffff,0x0(%rbp)
  mov    %ecx,D10(%rip)
L57:
  movl   $0x0,D41(%rip)
  cmp    %r13d,%r14d
  jne    L173
L153:
  movl   $0xffffffff,0x0(%rbp)
  jmp    L173
  nopl   0x0(%rax)
L84:
  mov    %r13d,0x0(%rbp)
L173:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L63:
  xor    %ecx,%ecx
  call   <mdaq_uart_read@plt>
  mov    %eax,%r13d
  test   %r14b,%r14b
  jne    L179
  xor    %eax,%eax
  test   %r13d,%r13d
  cmovns %r13d,%eax
  mov    %eax,0x0(%rbp)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L0:
  test   %eax,%eax
  jne    L174
  add    %r13d,%edi
  cmp    %ebx,%edi
  jae    L18
  mov    %edi,D10(%rip)
  jmp    L173
  nopw   0x0(%rax,%rax,1)
L1:
  mov    %eax,D10(%rip)
  cmp    $0x3,%eax
  jbe    L153
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L18:
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  mov    %ebx,0x0(%rbp)
  movl   $0x0,D10(%rip)
  jmp    L173
  nop
L123:
  mov    %r12,%rdi
  call   <memcpy@plt>
  mov    %ebx,0x0(%rbp)
  movl   $0x0,D10(%rip)
  jmp    L57
```

assistant: ```c
void UARTRecv(unsigned char module, unsigned char *data, int *status, unsigned int size, unsigned char blocking, unsigned int timeout, unsigned int msg_header, unsigned char use_msg_header) {
  int data_idx = 0;
  static unsigned char rx_buffer[(512) + 4];
  static int rx_buf_idx = 0;
  static int msg_header_at = 0;
  int result = mdaq_uart_read(module, rx_buffer + rx_buf_idx, size + (sizeof(msg_header) - rx_buf_idx), blocking ? timeout : 0);
  if (use_msg_header) {
    if (result > 0) {
      if (rx_buf_idx && !msg_header_at) {
        if (rx_buf_idx + result >= size) {
          memcpy(data, rx_buffer, size);
          *status = size;
          rx_buf_idx = 0;
        } else {
          rx_buf_idx += result;
        }
      } else {
        for (data_idx = 0; data_idx < result; data_idx++) {
          if (rx_buffer[data_idx + rx_buf_idx] == *(((unsigned char *)(&msg_header)) + msg_header_at))
            msg_header_at++;
          else
            msg_header_at = 0;
          if (msg_header_at == sizeof(msg_header)) {
            data_idx++;
            if (size == rx_buf_idx + result - data_idx) {
              memcpy(data, rx_buffer + rx_buf_idx + data_idx, (result - data_idx) > (512) ? (512) : result - data_idx);
              *status = size;
              rx_buf_idx = 0;
            } else {
              memmove(rx_buffer, rx_buffer + rx_buf_idx + data_idx, (result - data_idx) > (512) ? (512) : result - data_idx);
              rx_buf_idx = result - data_idx;
              *status = (-1);
            }
            msg_header_at = 0;
            break;
          }
        }
        if (data_idx == result && msg_header_at < sizeof(msg_header))
          *status = -1;
      }
    } else {
      *status = result;
    }
  } else {
    if (blocking)
      *status = result;
    else
      *status = result > 0 ? result : 0;
  }
}
```