user: 请从给定的汇编指令推导出C源代码：

```asm
<longshrinkarraytonew>:
  endbr64
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  movslq %edx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %ecx,0xc(%rsp)
  lea    0x4(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  mov    0x48(%rsp),%r13
  mov    %r8d,0x8(%rsp)
  lea    0xc(%rsp),%rdi
  mov    %r14d,%r8d
  lea    0x40(%rsp),%rcx
  mov    %r9d,0x4(%rsp)
  mov    %r12d,%r9d
  call   <checkifinarray@plt>
  mov    0xc(%rsp),%edx
  mov    0x4(%rsp),%ebx
  cmp    %ebx,%edx
  je     L0
  mov    0x8(%rsp),%ecx
  mov    0x40(%rsp),%eax
  cmp    %eax,%ecx
  je     L0
  mov    %edx,%esi
  or     %ecx,%esi
  sete   %dil
  cmp    %r12d,%eax
  sete   %sil
  test   %sil,%dil
  je     L79
  cmp    %r14d,%ebx
  je     L8
L79:
  sub    %edx,%ebx
  sub    %ecx,%eax
  movslq %ebx,%rbx
  movslq %eax,%r14
  mov    %rbx,%rdi
  imul   %r14,%rdi
  shl    $0x3,%rdi
  call   <malloc@plt>
  xor    %edi,%edi
  mov    %rax,0x0(%r13)
  test   %rax,%rax
  setne  %dil
  call   <assert@plt>
  movslq 0xc(%rsp),%rax
  xor    %r10d,%r10d
  movslq 0x8(%rsp),%rcx
  mov    0x0(%r13),%rdx
  lea    0x0(,%r14,8),%r9
  lea    0x0(,%r12,8),%r11
  imul   %r12,%rax
  lea    (%rdx,%r9,1),%r8
  add    %rcx,%rax
  lea    0x0(%rbp,%rax,8),%rcx
  nopl   (%rax)
L86:
  mov    %rdx,%rdi
  mov    %rcx,%rsi
  cmp    %r8,%rdx
  jae    L42
  lea    -0x1(%r8),%rax
  lea    0x8(%rcx),%rbp
  sub    %rdx,%rax
  cmp    %rbp,%rdx
  je     L116
  cmp    $0x17,%rax
  jbe    L116
  shr    $0x3,%rax
  lea    0x1(%rax),%rsi
  xor    %eax,%eax
  mov    %rsi,%rdi
  shr    %rdi
  shl    $0x4,%rdi
  nopl   (%rax)
L89:
  movdqu (%rcx,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L89
  mov    %rsi,%rbp
  and    $0xfffffffffffffffe,%rbp
  lea    0x0(,%rbp,8),%rdi
  lea    (%rcx,%rdi,1),%rax
  add    %rdx,%rdi
  cmp    %rbp,%rsi
  je     L42
  mov    (%rax),%rax
  mov    %rax,(%rdi)
L42:
  add    $0x1,%r10
  add    %r9,%rdx
  add    %r9,%r8
  add    %r11,%rcx
  cmp    %r10,%rbx
  jne    L86
L108:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L116:
  movsq  %ds:(%rsi),%es:(%rdi)
  cmp    %r8,%rdi
  jae    L42
  movsq  %ds:(%rsi),%es:(%rdi)
  cmp    %r8,%rdi
  jb     L116
  jmp    L42
L0:
  movq   $0x0,0x0(%r13)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L8:
  mov    %r14d,%esi
  mov    %r13,%rdx
  mov    %rbp,%rdi
  imul   %r12d,%esi
  call   <longarrcpy@plt>
  jmp    L108
```

assistant: ```c
void longshrinkarraytonew(long *in, int size1, int size2, int x1, int y1, int x2, int y2, long **out) {
  long *ifpt, *ofpt, *rowstart;
  size_t i, ux1, uy1, us2, w1, w2;
  checkifinarray(&x1, &y1, &x2, &y2, size1, size2);
  if (x1 == x2 || y1 == y2) {
    *out = NULL;
    return;
  }
  if (x1 == 0 && y1 == 0 && x2 == size1 && y2 == size2) {
    longarrcpy(in, size1 * size2, out);
    return;
  }
  w1 = x2 - x1;
  w2 = y2 - y1;
  *out = malloc(w1 * w2 * sizeof **out);
  assert(*out != NULL);
  ux1 = x1;
  uy1 = y1;
  us2 = size2;
  for (i = 0; i < w1; i++) {
    ofpt = rowstart = *out + i * w2;
    ifpt = in + (ux1 + i) * us2 + uy1;
    while (ofpt < rowstart + w2)
      *ofpt++ = *ifpt++;
  }
}
```