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

```asm
<xmrcv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %rdi,(%rsp)
  mov    $0x15,%edi
  lea    0x1c(%rsp),%rbp
  lea    0x1d(%rsp),%r15
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  call   <send_byte@plt>
  nopl   0x0(%rax,%rax,1)
L6:
  mov    %rbp,%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  js     L116
  movzbl 0x1c(%rsp),%eax
  cmp    $0x1,%al
  je     L106
  cmp    $0x18,%al
  je     L21
  cmp    $0x4,%al
  jne    L6
  mov    $0x6,%edi
  call   <send_byte@plt>
  nopl   0x0(%rax)
L5:
  mov    %r13,%rax
  sub    $0x1,%r13
  cmpb   $0x1a,0x0(%r13)
  je     L5
  mov    (%rsp),%rcx
  sub    0x8(%rsp),%rax
  mov    %rax,(%rcx)
  xor    %eax,%eax
  jmp    L192
  xchg   %ax,%ax
L21:
  mov    %rbp,%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  js     L116
  cmpb   $0x18,0x1c(%rsp)
  jne    L6
  nopl   0x0(%rax)
L116:
  mov    $0xffffffff,%eax
L192:
  mov    0xa8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L17
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L106:
  mov    %r15,%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  js     L116
  lea    0x1e(%rsp),%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  js     L116
  lea    0x20(%rsp),%r14
  lea    0xa0(%rsp),%r12
  xor    %ebx,%ebx
  jmp    L56
  nopl   (%rax)
L162:
  add    (%r14),%bl
  add    $0x1,%r14
  cmp    %r14,%r12
  je     L133
L56:
  mov    %r14,%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  jns    L162
  jmp    L116
  xchg   %ax,%ax
L133:
  lea    0x1f(%rsp),%rdi
  call   <receive_byte@plt>
  test   %rax,%rax
  js     L116
  movzbl 0x1d(%rsp),%eax
  movzbl 0x1e(%rsp),%edx
  add    %edx,%eax
  cmp    $0xff,%eax
  je     L168
L157:
  mov    $0x15,%edi
  call   <send_byte@plt>
  jmp    L6
L168:
  cmp    %bl,0x1f(%rsp)
  jne    L157
  mov    $0x6,%edi
  sub    $0xffffffffffffff80,%r13
  call   <send_byte@plt>
  movdqa 0x20(%rsp),%xmm0
  movdqa 0x30(%rsp),%xmm1
  movdqa 0x40(%rsp),%xmm2
  movdqa 0x50(%rsp),%xmm3
  movdqa 0x60(%rsp),%xmm4
  movdqa 0x70(%rsp),%xmm5
  movups %xmm0,-0x80(%r13)
  movdqa 0x80(%rsp),%xmm6
  movups %xmm1,-0x70(%r13)
  movdqa 0x90(%rsp),%xmm7
  movups %xmm2,-0x60(%r13)
  movups %xmm3,-0x50(%r13)
  movups %xmm4,-0x40(%r13)
  movups %xmm5,-0x30(%r13)
  movups %xmm6,-0x20(%r13)
  movups %xmm7,-0x10(%r13)
  jmp    L6
L17:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int xmrcv(long *bytes_rcvd, unsigned char *buf) {
  int err = 0, x, i, packetno = 0;
  unsigned char ch, seq, cmpl_seq, cksum, their_cksum;
  unsigned char data[128];
  unsigned char *start_buf = buf;
  send_byte(0x15);
  while (1) {
    if (receive_byte(&ch) < 0) {
      return -1;
    }
    if (ch == 0x01) {
      packetno++;
      err = 0;
      if (receive_byte(&seq) < 0) {
        return -1;
      }
      if (receive_byte(&cmpl_seq) < 0) {
        return -1;
      }
      cksum = 0;
      for (x = 0; x < 128; x++) {
        if (receive_byte(&data[x]) < 0) {
          return -1;
        }
        cksum += data[x];
      }
      if (receive_byte(&their_cksum) < 0) {
        return -1;
      }
      if (seq + cmpl_seq != 255) {
        err++;
      }
      if (their_cksum != cksum) {
        err++;
      }
      if (err) {
        send_byte(0x15);
      } else {
        send_byte(0x06);
        for (i = 0; i < 128; i++) {
          *buf++ = data[i];
        }
      }
    } else if (ch == 0x18) {
      if (receive_byte(&ch) < 0) {
        return -1;
      }
      if (ch == 0x18) {
        return -1;
      } else {
        continue;
      }
    } else if (ch == 0x04) {
      send_byte(0x06);
      while (*--buf == 0x1a)
        ;
      buf++;
      *bytes_rcvd = (buf - start_buf);
      return 0;
    }
  }
}
```