user: 下面的汇编指令对应的C源代码是什么：

```asm
<NV21Transform>:
  endbr64
  mov    %rdi,%r9
  mov    %rsi,%r10
  mov    %ecx,%edi
  mov    %edx,%esi
  mov    %r8d,%edx
  xor    %ecx,%ecx
  mov    %edi,%eax
  push   %r15
  and    $0x50,%edx
  push   %r14
  sete   %cl
  imul   %esi,%eax
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    (%rax,%rax,2),%r11d
  mov    %eax,-0x1c(%rsp)
  mov    %r11d,%eax
  shr    $0x1f,%eax
  add    %r11d,%eax
  sar    %eax
  mov    %eax,-0x14(%rsp)
  mov    %r8d,%eax
  test   $0x30,%r8b
  je     L203
  and    $0x1,%eax
  mov    %eax,-0x18(%rsp)
  mov    %r8d,%eax
  sar    %eax
  mov    %eax,%ebx
  or     %r8d,%eax
  and    $0x1,%eax
  and    $0x1,%ebx
  or     %ecx,%eax
  mov    %ebx,-0x20(%rsp)
  je     L283
L298:
  mov    %edi,%ebx
  mov    %esi,%ebp
  sar    %ebx
  sar    %ebp
  test   %edx,%edx
  je     L413
  mov    -0x18(%rsp),%r11d
  xor    $0x1,%r11d
  and    -0x20(%rsp),%r11d
  je     L416
  mov    -0x1c(%rsp),%r11d
  sub    %esi,%r11d
  test   %edi,%edi
  jle    L307
  mov    %esi,%r14d
  movslq %r11d,%r11
  mov    $0xffffffff,%r8d
  xor    %r12d,%r12d
  neg    %r14d
  lea    0x1(%rsi),%r15d
  movslq %r14d,%r14
  nopl   0x0(%rax)
L412:
  test   %esi,%esi
  jle    L248
  movslq %r8d,%rdx
  mov    %r11,%rcx
  lea    0x1(%r8),%eax
  sub    %rdx,%rcx
  cltq
  lea    (%r15,%rdx,1),%r13
  add    %r10,%rcx
  nopw   0x0(%rax,%rax,1)
L60:
  movzbl (%r9,%rax,1),%edx
  mov    %dl,-0x1(%rcx,%rax,1)
  add    $0x1,%rax
  cmp    %r13,%rax
  jne    L60
  add    %esi,%r8d
L248:
  add    $0x1,%r12d
  add    %r14,%r11
  cmp    %r12d,%edi
  jne    L412
L130:
  mov    -0x14(%rsp),%r11d
  sub    %esi,%r11d
  test   %ebx,%ebx
  jle    L403
  lea    -0x1(%rbp),%eax
  sub    $0x1,%r11d
  xor    %r12d,%r12d
  mov    %rax,%r13
  lea    0x4(%r9,%rax,2),%r14
  add    %r13d,%r13d
  nopw   0x0(%rax,%rax,1)
L123:
  test   %ebp,%ebp
  jle    L1
  movslq %r8d,%rdi
  movslq %r11d,%rdx
  lea    0x2(%r9,%rdi,1),%rax
  add    %r10,%rdx
  add    %r14,%rdi
  nopl   (%rax)
L369:
  movzbl -0x1(%rax),%ecx
  add    $0x2,%rax
  add    $0x2,%rdx
  mov    %cl,-0x1(%rdx)
  movzbl -0x2(%rax),%ecx
  mov    %cl,(%rdx)
  cmp    %rdi,%rax
  jne    L369
  lea    0x2(%r13,%r8,1),%r8d
L1:
  add    $0x1,%r12d
  sub    %esi,%r11d
  cmp    %r12d,%ebx
  jne    L123
L403:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L416:
  cmpl   $0x1,-0x20(%rsp)
  je     L157
  lea    -0x1(%rsi),%edx
  mov    %esi,%r14d
  mov    $0xffffffff,%r8d
  mov    %edx,%eax
  test   %edi,%edi
  jle    L163
L409:
  mov    %r10,%rcx
  lea    0x1(%rax),%r13d
  cltq
  movslq %r14d,%r15
  sub    %rdx,%rcx
  xor    %r12d,%r12d
  mov    $0xffffffff,%r8d
  add    %rax,%rcx
  nopl   0x0(%rax,%rax,1)
L105:
  test   %esi,%esi
  jle    L303
  movslq %r8d,%rax
  mov    %esi,-0x24(%rsp)
  lea    0x1(%r9,%rax,1),%rdx
  movslq %r13d,%rax
  add    %r10,%rax
  cs nopw 0x0(%rax,%rax,1)
L435:
  movzbl (%rdx),%esi
  sub    $0x1,%rax
  add    $0x1,%rdx
  mov    %sil,(%rax)
  cmp    %rcx,%rax
  jne    L435
  mov    -0x24(%rsp),%esi
  add    %esi,%r8d
L303:
  add    $0x1,%r12d
  add    %r14d,%r13d
  add    %r15,%rcx
  cmp    %r12d,%edi
  jg     L105
  cmpl   $0x1,-0x20(%rsp)
  je     L406
L163:
  mov    -0x1c(%rsp),%eax
  lea    -0x1(%rax,%rsi,1),%eax
L484:
  test   %ebx,%ebx
  jle    L403
  cltq
  movslq %r14d,%r14
  lea    (%r10,%rax,1),%rdi
  lea    -0x1(%rbp),%eax
  mov    %rax,%r10
  lea    0x4(%r9,%rax,2),%r12
  add    %r10d,%r10d
  nopl   0x0(%rax,%rax,1)
L436:
  test   %ebp,%ebp
  jle    L442
  movslq %r8d,%rsi
  mov    %rdi,%rdx
  lea    0x2(%r9,%rsi,1),%rax
  add    %r12,%rsi
  nopw   0x0(%rax,%rax,1)
L117:
  movzbl -0x1(%rax),%ecx
  add    $0x2,%rax
  sub    $0x2,%rdx
  mov    %cl,0x1(%rdx)
  movzbl -0x2(%rax),%ecx
  mov    %cl,0x2(%rdx)
  cmp    %rsi,%rax
  jne    L117
  lea    0x2(%r10,%r8,1),%r8d
L442:
  add    $0x1,%r11d
  add    %r14,%rdi
  cmp    %r11d,%ebx
  jne    L436
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L203:
  not    %eax
  and    $0x1,%eax
  and    $0x2,%r8d
  mov    %eax,-0x18(%rsp)
  je     L378
  or     %ecx,%eax
  movl   $0x0,-0x20(%rsp)
  jne    L298
L283:
  mov    -0x14(%rsp),%edx
  mov    %r9,%rsi
  pop    %rbx
  mov    %r10,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <memcpy@plt>
  nopl   0x0(%rax)
L413:
  mov    -0x1c(%rsp),%eax
  cmpl   $0x1,-0x18(%rsp)
  lea    -0x1(%rax),%r13d
  je     L373
  cmpl   $0x1,-0x20(%rsp)
  je     L344
  mov    %edi,-0x10(%rsp)
  lea    -0x1(%rdi),%eax
  test   %edi,%edi
  jle    L217
  mov    $0xffffffffffffffff,%r15
L453:
  cltq
  movslq -0x10(%rsp),%r8
  mov    %ebx,-0xc(%rsp)
  xor    %r12d,%r12d
  lea    (%r10,%rax,1),%r11
  lea    0x1(%rsi),%eax
  mov    $0xffffffff,%r14d
  add    %r9,%rax
  mov    %rax,%rbx
  nopl   (%rax)
L2:
  test   %esi,%esi
  jle    L420
  mov    %esi,-0x24(%rsp)
  movslq %r14d,%rcx
  mov    %r11,%rdx
  lea    0x1(%r9,%rcx,1),%rax
  add    %rbx,%rcx
  xchg   %ax,%ax
L58:
  movzbl (%rax),%esi
  add    $0x1,%rax
  mov    %sil,(%rdx)
  add    %r8,%rdx
  cmp    %rcx,%rax
  jne    L58
  mov    -0x24(%rsp),%esi
  add    %esi,%r14d
L420:
  add    $0x1,%r12d
  add    %r15,%r11
  cmp    %r12d,%edi
  jg     L2
  cmpl   $0x1,-0x18(%rsp)
  mov    -0xc(%rsp),%ebx
  je     L113
  cmpl   $0x1,-0x20(%rsp)
  mov    $0x2,%r11d
  je     L450
L217:
  mov    -0x1c(%rsp),%eax
  mov    $0xfffffffffffffffe,%r11
  lea    -0x2(%rax,%rdi,1),%eax
  mov    %eax,-0x1c(%rsp)
L450:
  test   %ebx,%ebx
  jle    L403
  lea    -0x1(%rbp),%eax
  movslq -0x1c(%rsp),%r8
  movslq -0x10(%rsp),%rdi
  mov    %rax,%r12
  lea    0x3(%r9,%rax,2),%r14
  add    %r10,%r8
  add    %r12d,%r12d
  xor    %r10d,%r10d
  nopw   0x0(%rax,%rax,1)
L391:
  test   %ebp,%ebp
  jle    L447
  movslq %r13d,%rsi
  mov    %r8,%rdx
  lea    0x1(%r9,%rsi,1),%rax
  add    %r14,%rsi
  nopw   0x0(%rax,%rax,1)
L237:
  movzbl (%rax),%ecx
  add    $0x2,%rax
  mov    %cl,(%rdx)
  movzbl -0x1(%rax),%ecx
  mov    %cl,0x1(%rdx)
  add    %rdi,%rdx
  cmp    %rax,%rsi
  jne    L237
  lea    0x2(%r13,%r12,1),%r13d
L447:
  add    $0x1,%r10d
  add    %r11,%r8
  cmp    %r10d,%ebx
  jne    L391
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L378:
  movl   $0x1,-0x20(%rsp)
  jmp    L298
L373:
  cmpl   $0x1,-0x20(%rsp)
  je     L367
  mov    %edi,%eax
  mov    $0xffffffffffffffff,%r15
  neg    %eax
  mov    %eax,-0x10(%rsp)
  mov    %r13d,%eax
  test   %edi,%edi
  jg     L453
L170:
  mov    -0x14(%rsp),%eax
  mov    $0xfffffffffffffffe,%r11
  sub    $0x2,%eax
  mov    %eax,-0x1c(%rsp)
  jmp    L450
L157:
  mov    -0x1c(%rsp),%eax
  mov    %esi,%r14d
  neg    %r14d
  sub    $0x1,%eax
  test   %edi,%edi
  jle    L3
  lea    -0x1(%rsi),%edx
  jmp    L409
L3:
  mov    $0xffffffff,%r8d
L406:
  mov    -0x14(%rsp),%eax
  sub    $0x1,%eax
  jmp    L484
L113:
  cmpl   $0x1,-0x20(%rsp)
  jne    L170
L481:
  mov    -0x14(%rsp),%eax
  mov    $0x2,%r11d
  sub    %edi,%eax
  mov    %eax,-0x1c(%rsp)
  jmp    L450
L344:
  mov    %edi,-0x10(%rsp)
  mov    -0x18(%rsp),%eax
  mov    $0x1,%r15d
  mov    $0x2,%r11d
  test   %edi,%edi
  jg     L453
  jmp    L450
L367:
  mov    %edi,%edx
  sub    %edi,%eax
  mov    $0x1,%r15d
  neg    %edx
  mov    %edx,-0x10(%rsp)
  test   %edi,%edi
  jg     L453
  jmp    L481
L307:
  mov    $0xffffffff,%r8d
  jmp    L130
```

assistant: ```c
void NV21Transform(const unsigned char *src, const unsigned char *dst, int srcWidth, int srcHeight, int directionFlag) {
  unsigned char *cdst = dst;
  unsigned char *csrc = src;
  int rotate = 0;
  int hflip = 0;
  int vflip = 0;
  if ((0x10 & directionFlag) != 0 || (0x40 & directionFlag) != 0) {
    rotate = 0;
  } else {
    rotate = 1;
  }
  if ((0x10 & directionFlag) != 0 || (0x20 & directionFlag) != 0) {
    hflip = ((0x01 & directionFlag) != 0) ? 1 : 0;
    vflip = ((0x02 & directionFlag) != 0) ? 1 : 0;
  } else {
    if (((0x02 & directionFlag) != 0)) {
      hflip = ((0x01 & directionFlag) != 0) ? 0 : 1;
      vflip = ((0x01 & directionFlag) != 0) ? 0 : 0;
    } else {
      hflip = ((0x01 & directionFlag) != 0) ? 0 : 1;
      vflip = ((0x01 & directionFlag) != 0) ? 1 : 1;
    }
  }
  int ySize = srcHeight * srcWidth;
  int totalSize = ySize * 3 / 2;
  int yStart, yStep, xStep;
  if (rotate == 0 && hflip == 0 && vflip == 0) {
    memcpy(cdst, csrc, totalSize);
    return;
  }
  int srcX, srcY, srcCurr;
  int dstX, dstY, dstCurr;
  int halfHeight = srcHeight >> 1, halfWidth = srcWidth >> 1;
  if (rotate == 1) {
    if (hflip == 1) {
      yStart = vflip == 1 ? ySize - srcHeight : ySize - 1;
      yStep = vflip == 1 ? 1 : -1;
      xStep = -srcHeight;
    } else {
      yStart = vflip == 1 ? 0 : srcHeight - 1;
      yStep = vflip == 1 ? 1 : -1;
      xStep = srcHeight;
    }
    srcCurr = -1;
    for (srcY = 0; srcY < srcHeight; ++srcY) {
      dstCurr = yStart;
      for (srcX = 0; srcX < srcWidth; ++srcX) {
        cdst[dstCurr] = csrc[++srcCurr];
        dstCurr += xStep;
      }
      yStart += yStep;
    }
    if (hflip == 1) {
      yStart = vflip == 1 ? totalSize - srcHeight : totalSize - 2;
      yStep = vflip == 1 ? 2 : -2;
      xStep = -srcHeight;
    } else {
      yStart = vflip == 1 ? ySize : ySize + srcHeight - 2;
      yStep = vflip == 1 ? 2 : -2;
      xStep = srcHeight;
    }
    srcCurr = ySize - 1;
    for (srcY = 0; srcY < halfHeight; ++srcY) {
      dstCurr = yStart;
      for (srcX = 0; srcX < halfWidth; ++srcX) {
        cdst[dstCurr] = csrc[++srcCurr];
        cdst[dstCurr + 1] = csrc[++srcCurr];
        dstCurr += xStep;
      }
      yStart += yStep;
    }
  } else {
    if (vflip == 1 && hflip == 0) {
      yStart = ySize - srcWidth;
      srcCurr = -1;
      for (srcY = 0; srcY < srcHeight; ++srcY) {
        dstCurr = yStart - 1;
        for (srcX = 0; srcX < srcWidth; ++srcX) {
          cdst[++dstCurr] = csrc[++srcCurr];
        }
        yStart -= srcWidth;
      }
      yStart = totalSize - srcWidth;
      for (srcY = 0; srcY < halfHeight; ++srcY) {
        dstCurr = yStart - 1;
        for (srcX = 0; srcX < halfWidth; ++srcX) {
          cdst[++dstCurr] = csrc[++srcCurr];
          cdst[++dstCurr] = csrc[++srcCurr];
        }
        yStart -= srcWidth;
      }
    } else {
      yStep = vflip == 1 ? -srcWidth : srcWidth;
      yStart = vflip == 1 ? ySize - 1 : srcWidth - 1;
      srcCurr = -1;
      for (srcY = 0; srcY < srcHeight; ++srcY) {
        dstCurr = yStart + 1;
        for (srcX = 0; srcX < srcWidth; ++srcX) {
          cdst[--dstCurr] = csrc[++srcCurr];
        }
        yStart += yStep;
      }
      yStart = vflip == 1 ? totalSize - 1 : ySize + srcWidth - 1;
      for (srcY = 0; srcY < halfHeight; ++srcY) {
        dstCurr = yStart;
        for (srcX = 0; srcX < halfWidth; ++srcX) {
          cdst[dstCurr - 1] = csrc[++srcCurr];
          cdst[dstCurr] = csrc[++srcCurr];
          dstCurr -= 2;
        }
        yStart += yStep;
      }
    }
  }
}
```