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

```asm
<dropshadow>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r13
  mov    %esi,0x14(%rsp)
  mov    %edx,0x1c(%rsp)
  mov    %ecx,%ebx
  mov    %r8d,%r14d
  mov    %r9d,%r12d
  movsd  %xmm0,0x8(%rsp)
  mov    0x90(%rsp),%eax
  mov    %eax,%edi
  and    $0x1,%edi
  mov    %edi,0x18(%rsp)
  mov    %eax,%ecx
  shr    %ecx
  mov    %ecx,0x20(%rsp)
  shr    $0x2,%eax
  mov    %eax,0x28(%rsp)
  imul   %edx,%esi
  mov    %esi,%r15d
  lea    0x0(,%rsi,4),%eax
  mov    %eax,0x2c(%rsp)
  mov    %eax,%edi
  call   <allocMemory@plt>
  mov    %rax,%rbp
  movzbl 0x18(%rsp),%eax
  neg    %eax
  movzbl %al,%eax
  mov    %eax,0x24(%rsp)
  mov    %r15d,%edx
  mov    %eax,%esi
  mov    %rbp,%rdi
  call   <clearMemory@plt>
  mov    %ebx,%eax
  or     %r14d,%eax
  jne    L224
  cmpl   $0x0,0x18(%rsp)
  jne    L240
  mov    %r15d,%ecx
  mov    $0x0,%eax
  test   %r15d,%r15d
  jle    L232
L316:
  movzbl 0x3(%r13,%rax,4),%edx
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L316
  jmp    L232
L240:
  test   %r15d,%r15d
  jle    L232
  mov    %r15d,%ecx
  mov    $0x0,%eax
L185:
  movzbl 0x3(%r13,%rax,4),%edx
  not    %edx
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L185
L232:
  sub    $0x8,%rsp
  mov    0x24(%rsp),%edx
  push   %rdx
  mov    0x24(%rsp),%esi
  push   %rsi
  push   $0x0
  push   $0x0
  mov    0x4c(%rsp),%eax
  push   %rax
  mov    0xb8(%rsp),%r9d
  mov    0xb0(%rsp),%r8d
  mov    0xa8(%rsp),%ecx
  mov    %rbp,%rdi
  call   <blurAlpha@plt>
  mov    %r12d,%r8d
  shr    $0x10,%r8d
  movzbl %r8b,%r8d
  mov    %r12d,%eax
  movzbl %ah,%eax
  mov    %eax,%r14d
  movzbl %r12b,%ebx
  mov    %r12d,%eax
  shl    $0x10,%eax
  and    $0xff0000,%eax
  or     %r8d,%eax
  and    $0xff00,%r12d
  or     %eax,%r12d
  or     $0xff000000,%r12d
  movslq %r15d,%r15
  lea    0x0(,%r15,4),%rax
  lea    -0x1(%rbp,%r15,1),%rdx
  add    $0x30,%rsp
  cmp    %rdx,%rbp
  ja     L380
  lea    -0x8(%rbp,%rax,1),%rcx
  lea    -0x1(%rbp),%rdi
  movsd  D5(%rip),%xmm1
  movapd %xmm1,%xmm3
  movabs $0x8000000000000000,%r10
  mov    $0x0,%r9d
  movsd  D14(%rip),%xmm4
  jmp    L127
L224:
  lea    0x3(%r13),%rcx
  mov    %ebx,%eax
  neg    %eax
  cmovs  %ebx,%eax
  mov    0x14(%rsp),%edi
  mov    %edi,%r9d
  sub    %eax,%r9d
  mov    %r14d,%eax
  neg    %eax
  cmovs  %r14d,%eax
  mov    0x1c(%rsp),%r8d
  sub    %eax,%r8d
  lea    0x0(,%rdi,4),%eax
  test   %ebx,%ebx
  jle    L248
  movslq %ebx,%rbx
  add    %rbp,%rbx
L220:
  test   %r14d,%r14d
  jle    L394
  imul   0x14(%rsp),%r14d
  movslq %r14d,%r14
  add    %r14,%rbx
L132:
  mov    0x18(%rsp),%esi
  test   %esi,%esi
  jne    L323
  mov    %r9d,%edx
  movslq 0x14(%rsp),%rdi
  movslq %eax,%r10
  test   %r8d,%r8d
  jg     L117
  jmp    L232
L248:
  lea    0x0(,%rbx,4),%edx
  movslq %edx,%rdx
  sub    %rdx,%rcx
  mov    %rbp,%rbx
  jmp    L220
L394:
  imul   0x14(%rsp),%r14d
  lea    0x0(,%r14,4),%edx
  movslq %edx,%rdx
  sub    %rdx,%rcx
  jmp    L132
L323:
  mov    $0x0,%edi
  mov    %r9d,%esi
  movslq 0x14(%rsp),%r10
  movslq %eax,%r11
  test   %r8d,%r8d
  jg     L3
  jmp    L232
L201:
  movzbl (%rcx,%rax,4),%edx
  not    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L201
L372:
  add    %r10,%rbx
  add    %r11,%rcx
  add    $0x1,%edi
  cmp    %edi,%r8d
  je     L232
L3:
  mov    $0x0,%eax
  test   %r9d,%r9d
  jg     L201
  jmp    L372
L133:
  movzbl (%rcx,%rax,4),%r11d
  mov    %r11b,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L133
L341:
  add    %rdi,%rbx
  add    %r10,%rcx
  add    $0x1,%esi
  cmp    %esi,%r8d
  je     L232
L117:
  mov    $0x0,%eax
  test   %r9d,%r9d
  jg     L133
  jmp    L341
L17:
  subsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%rax
  xor    %r10,%rax
  jmp    L118
L342:
  mov    %rax,%rsi
  shr    %rsi
  mov    %rax,%r11
  and    $0x1,%r11d
  or     %r11,%rsi
  pxor   %xmm0,%xmm0
  cvtsi2sd %rsi,%xmm0
  addsd  %xmm0,%xmm0
L186:
  divsd  %xmm4,%xmm0
  cvtsd2ss %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2ss %r14d,%xmm2
  mulss  %xmm0,%xmm2
  cvttss2si %xmm2,%esi
  shl    $0x8,%esi
  pxor   %xmm2,%xmm2
  cvtsi2ss %ebx,%xmm2
  mulss  %xmm0,%xmm2
  cvttss2si %xmm2,%r11d
  shl    $0x10,%r11d
  or     %r11d,%esi
  pxor   %xmm2,%xmm2
  cvtsi2ss %r8d,%xmm2
  mulss  %xmm2,%xmm0
  cvttss2si %xmm0,%r11d
  or     %r11d,%esi
  shl    $0x18,%eax
  or     %eax,%esi
L129:
  mov    %esi,0x4(%rcx)
  sub    $0x1,%rdx
  sub    $0x4,%rcx
  cmp    %rdi,%rdx
  je     L380
L127:
  movzbl (%rdx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  comisd %xmm1,%xmm0
  jae    L17
  cvttsd2si %xmm0,%rax
L118:
  mov    %r12d,%esi
  cmp    $0xfe,%rax
  ja     L129
  mov    %r9d,%esi
  test   %rax,%rax
  je     L129
  js     L342
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L186
L380:
  cmpl   $0x0,0x18(%rsp)
  je     L219
  mov    0x20(%rsp),%eax
  or     0x28(%rsp),%eax
  test   $0x1,%al
  jne    L34
  mov    0x1c(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <compositeSourceAtop@plt>
L122:
  mov    %rbp,%rdi
  call   <freeMemory@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L34:
  mov    0x1c(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <compositeSourceIn@plt>
  jmp    L122
L219:
  testb  $0x1,0x20(%rsp)
  jne    L38
  testb  $0x1,0x28(%rsp)
  je     L72
  mov    0x2c(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <copyMemory@plt>
  jmp    L122
L38:
  mov    0x1c(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <compositeSourceOut@plt>
  jmp    L122
L72:
  mov    0x1c(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <compositeDestinationOver@plt>
  jmp    L122
```

tool_calls: name: parse_data
arguments: label: D5
data_type: byte[8]
name: parse_data
arguments: label: D14
data_type: f64

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x43]}

tool: D14: 255

assistant: ```c
void dropshadow(unsigned char *img, int width, int height, int dx, int dy, unsigned int color, int alpha, int bx, int by, double strength, int quality, unsigned int flags) {
  int inner = flags & 1;
  int knockout = (flags >> 1) & 1;
  int hideObject = (flags >> 2) & 1;
  int size = width * height;
  int size4 = size << 2;
  int i;
  unsigned char defaultalpha = (inner == 1) ? 0xff : 0;
  unsigned char *tmp = allocMemory(size4);
  clearMemory(tmp, defaultalpha, size);
  unsigned char *ptmp = tmp;
  unsigned char *pimg = img + 3;
  if (dx == 0 && dy == 0) {
    if (inner == 1) {
      for (i = 0; i < size; ++i) {
        *ptmp++ = 255 - *pimg;
        pimg += 4;
      }
    } else {
      for (i = 0; i < size; ++i) {
        *ptmp++ = *pimg;
        pimg += 4;
      }
    }
  } else {
    int w = width - ((dx) < 0 ? -(dx) : (dx));
    int h = height - ((dy) < 0 ? -(dy) : (dy));
    int width4 = width << 2;
    int x, x4, y;
    if (dx > 0) {
      ptmp += dx;
    } else {
      pimg -= dx * 4;
    }
    if (dy > 0) {
      ptmp += dy * width;
    } else {
      pimg -= dy * width * 4;
    }
    if (inner == 1) {
      for (y = 0; y < h; ++y) {
        for (x = 0, x4 = 0; x < w; ++x, x4 += 4) {
          *(ptmp + x) = 255 - *(pimg + x4);
        }
        ptmp += width;
        pimg += width4;
      }
    } else {
      for (y = 0; y < h; ++y) {
        for (x = 0, x4 = 0; x < w; ++x, x4 += 4) {
          *(ptmp + x) = *(pimg + x4);
        }
        ptmp += width;
        pimg += width4;
      }
    }
  }
  blurAlpha(tmp, width, height, bx, by, quality, defaultalpha, 0, 0, width, height);
  unsigned char r = (color >> 16) & 0xff;
  unsigned char g = (color >> 8) & 0xff;
  unsigned char b = color & 0xff;
  unsigned int bgr = r | g << 8 | b << 16 | 0xff000000;
  float af;
  unsigned long ac;
  unsigned int *ptmp32 = (unsigned int *)tmp + size - 1;
  ptmp = tmp + size;
  while (--ptmp >= tmp) {
    ac = *ptmp * strength;
    if (ac >= 255) {
      *ptmp32-- = bgr;
    } else if (ac > 0) {
      af = ac / 255.0;
      *ptmp32-- = (int)(r * af) | (int)(g * af) << 8 | (int)(b * af) << 16 | ac << 24;
    } else {
      *ptmp32-- = 0;
    }
  }
  if (inner == 1) {
    if (knockout == 0 && hideObject == 0) {
      compositeSourceAtop(img, tmp, width, height);
    } else {
      compositeSourceIn(img, tmp, width, height);
    }
  } else {
    if (knockout == 1) {
      compositeSourceOut(img, tmp, width, height);
    } else if (hideObject == 1) {
      copyMemory(img, tmp, size4);
    } else {
      compositeDestinationOver(img, tmp, width, height);
    }
  }
  freeMemory(tmp);
}
```