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

```asm
<__imlib_CalcApoints>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %r8d,%r13d
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x18,%rsp
  movl   $0x0,0x4(%rsp)
  test   %esi,%esi
  jns    L360
  movl   $0x1,0x4(%rsp)
  neg    %ebx
L360:
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  lea    (%r15,%rbp,1),%r8d
  mov    %rax,%r12
  cmp    %ebx,%r8d
  jle    L413
  cmp    %r15d,%ebx
  jge    L471
  mov    %ebx,%r8d
  mov    %ebx,%r15d
  xor    %ebp,%ebp
L413:
  test   %r13d,%r13d
  jne    L227
  xor    %ecx,%ecx
  test   %r15d,%r15d
  jle    L94
  lea    -0x1(%r15),%eax
  cmp    $0x2,%eax
  jbe    L399
  mov    %r15d,%edx
  movdqa D10(%rip),%xmm0
  mov    %r12,%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%r12,%rdx,1),%rdx
  nopl   0x0(%rax)
L89:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L89
  mov    %r15d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r15b
  je     L473
L251:
  movslq %eax,%rdx
  movl   $0x40004000,(%r12,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %edx,%r15d
  jle    L473
  movl   $0x40004000,0x4(%r12,%rcx,1)
  add    $0x2,%eax
  cmp    %eax,%r15d
  jle    L473
  movl   $0x40004000,0x8(%r12,%rcx,1)
L473:
  mov    %r15d,%ecx
L94:
  cmp    %r8d,%ebx
  jle    L145
  sub    %r15d,%r14d
  mov    %ebx,%esi
  sub    %ebp,%r14d
  sub    %r15d,%esi
  mov    %r14d,%eax
  sub    %ebp,%esi
  shl    $0x10,%eax
  cltd
  idiv   %esi
  mov    %eax,%edi
  mov    %esi,%eax
  shl    $0xe,%eax
  cltd
  idiv   %r14d
  add    $0x1,%eax
  test   %esi,%esi
  jle    L145
  mov    %eax,%r11d
  lea    -0x1(%rsi),%edx
  shl    $0x10,%r11d
  cmp    $0x2,%edx
  jbe    L93
  lea    (%rdi,%rdi,1),%edx
  movd   %edi,%xmm7
  pxor   %xmm2,%xmm2
  movdqa D12(%rip),%xmm3
  lea    (%rdx,%rdi,1),%r8d
  movd   %edx,%xmm0
  lea    0x0(,%rdi,4),%edx
  movd   %r8d,%xmm5
  punpckldq %xmm7,%xmm2
  movd   %edx,%xmm4
  mov    %esi,%r8d
  punpckldq %xmm5,%xmm0
  movd   %eax,%xmm5
  movd   %r11d,%xmm7
  movslq %ecx,%rdx
  pshufd $0x0,%xmm5,%xmm5
  shr    $0x2,%r8d
  lea    (%r12,%rdx,4),%rdx
  punpcklqdq %xmm0,%xmm2
  pshufd $0x0,%xmm7,%xmm8
  shl    $0x4,%r8
  movdqa %xmm5,%xmm6
  movdqa D38(%rip),%xmm7
  pshufd $0x0,%xmm4,%xmm4
  psrlq  $0x20,%xmm6
  add    %rdx,%r8
  xchg   %ax,%ax
L315:
  movdqa %xmm2,%xmm0
  movdqa %xmm7,%xmm1
  paddd  %xmm4,%xmm2
  add    $0x10,%rdx
  psrad  $0x8,%xmm0
  pand   %xmm3,%xmm0
  psubd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrlq  $0x20,%xmm1
  pmuludq %xmm5,%xmm0
  pmuludq %xmm6,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  punpckldq %xmm1,%xmm0
  psrad  $0x8,%xmm0
  por    %xmm8,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %r8,%rdx
  jne    L315
  mov    %esi,%r8d
  mov    %edi,%r10d
  and    $0xfffffffc,%r8d
  imul   %r8d,%r10d
  lea    (%rcx,%r8,1),%edx
  cmp    %r8d,%esi
  je     L392
L302:
  movslq %edx,%r14
  lea    0x0(,%r14,4),%rdx
  mov    %rdx,0x8(%rsp)
  mov    %r10d,%edx
  add    %edi,%r10d
  movzbl %dh,%edx
  mov    %edx,%r15d
  mov    $0x100,%edx
  sub    %r15d,%edx
  mov    %edx,%r9d
  imul   %eax,%r9d
  sar    $0x8,%r9d
  or     %r11d,%r9d
  mov    %r9d,(%r12,%r14,4)
  lea    0x1(%r8),%r9d
  cmp    %r9d,%esi
  jle    L392
  mov    %r10d,%edx
  mov    $0x100,%r9d
  add    $0x2,%r8d
  add    %r10d,%edi
  movzbl %dh,%edx
  mov    0x8(%rsp),%r14
  sub    %edx,%r9d
  imul   %eax,%r9d
  sar    $0x8,%r9d
  or     %r11d,%r9d
  mov    %r9d,0x4(%r12,%r14,1)
  cmp    %r8d,%esi
  jle    L392
  mov    %edi,%edx
  movzbl %dh,%edi
  mov    $0x100,%edx
  sub    %edi,%edx
  imul   %edx,%eax
  sar    $0x8,%eax
  or     %r11d,%eax
  mov    %eax,0x8(%r12,%r14,1)
L392:
  add    %esi,%ecx
L145:
  test   %ebp,%ebp
  jle    L131
  lea    -0x1(%rbp),%eax
  cmp    $0x2,%eax
  jbe    L294
  mov    %ebp,%edx
  movslq %ecx,%rax
  movdqa D10(%rip),%xmm0
  shr    $0x2,%edx
  lea    (%r12,%rax,4),%rax
  shl    $0x4,%rdx
  add    %rax,%rdx
  nopl   0x0(%rax)
L99:
  movups %xmm0,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L99
  mov    %ebp,%r13d
  and    $0xfffffffc,%r13d
  add    %r13d,%ecx
  cmp    %r13d,%ebp
  je     L131
L294:
  movslq %ecx,%rcx
  lea    0x1(%r13),%edx
  movl   $0x40004000,(%r12,%rcx,4)
  lea    0x0(,%rcx,4),%rax
  cmp    %ebp,%edx
  jge    L131
  movl   $0x40004000,0x4(%r12,%rax,1)
  add    $0x2,%r13d
  cmp    %r13d,%ebp
  jle    L131
  movl   $0x40004000,0x8(%r12,%rax,1)
L131:
  mov    0x4(%rsp),%eax
  test   %eax,%eax
  je     L365
  mov    %ebx,%edi
  sar    %edi
  lea    -0x1(%rdi),%eax
  je     L365
  movslq %ebx,%r10
  movslq %edi,%rcx
  mov    %edi,%esi
  mov    %r10,%r8
  lea    0x0(,%rcx,4),%r9
  sub    %rcx,%r8
  add    %r8,%rcx
  lea    0x0(,%r8,4),%rdx
  shl    $0x2,%rcx
  test   %rcx,%rcx
  setle  %cl
  cmp    %r9,%rdx
  setge  %r11b
  or     %r11b,%cl
  je     L36
  cmp    $0x1,%edi
  je     L36
  cmp    $0x2,%eax
  jbe    L402
  mov    %edi,%r10d
  lea    -0x10(%r12,%r9,1),%rsi
  add    %r12,%rdx
  shr    $0x2,%r10d
  lea    -0x10(%rsi),%rcx
  lea    -0x1(%r10),%r11d
  mov    %rcx,%r10
  shl    $0x4,%r11
  sub    %r11,%r10
  jmp    L496
  nopw   0x0(%rax,%rax,1)
L445:
  sub    $0x10,%rcx
L496:
  movdqu (%rsi),%xmm0
  movdqu (%rdx),%xmm3
  add    $0x10,%rdx
  pshufd $0x1b,%xmm3,%xmm1
  pshufd $0x1b,%xmm0,%xmm0
  movups %xmm1,(%rsi)
  mov    %rcx,%rsi
  movups %xmm0,-0x10(%rdx)
  cmp    %rcx,%r10
  jne    L445
  mov    %edi,%edx
  and    $0xfffffffc,%edx
  sub    %edx,%eax
  cmp    %edx,%edi
  je     L365
  sub    %edx,%edi
  mov    %edi,%esi
  cmp    $0x1,%edi
  je     L466
L139:
  mov    %rdx,%rcx
  add    %rdx,%r8
  neg    %rcx
  lea    (%r12,%r8,4),%rdx
  lea    -0x8(%r9,%rcx,4),%rcx
  movq   (%rdx),%xmm1
  add    %r12,%rcx
  movq   (%rcx),%xmm0
  pshufd $0xe1,%xmm1,%xmm1
  movq   %xmm1,(%rcx)
  pshufd $0xe1,%xmm0,%xmm0
  movq   %xmm0,(%rdx)
  mov    %esi,%edx
  and    $0xfffffffe,%edx
  sub    %edx,%eax
  cmp    %edx,%esi
  je     L365
L466:
  sub    %eax,%ebx
  movslq %eax,%rdx
  movslq %ebx,%rbx
  lea    (%r12,%rdx,4),%rdx
  lea    -0x4(%r12,%rbx,4),%rax
  mov    (%rdx),%ecx
  mov    (%rax),%esi
  mov    %esi,(%rdx)
  mov    %ecx,(%rax)
L365:
  add    $0x18,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L227:
  test   %r15d,%r15d
  jle    L303
  movslq %r15d,%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    %r8d,0x8(%rsp)
  shl    $0x2,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%r8d
  mov    %r15d,%esi
L112:
  cmp    %r8d,%ebx
  jle    L474
  mov    %r14d,%eax
  mov    %ebx,%ecx
  sub    %r15d,%eax
  sub    %r15d,%ecx
  sub    %ebp,%eax
  sub    %ebp,%ecx
  shl    $0x10,%eax
  cltd
  idiv   %ecx
  test   %ecx,%ecx
  jle    L474
  lea    -0x1(%rcx),%edx
  sub    $0x1,%r14d
  cmp    $0x2,%edx
  jbe    L505
  lea    (%rax,%rax,1),%edx
  movd   %r15d,%xmm6
  pxor   %xmm4,%xmm4
  movdqa D12(%rip),%xmm3
  lea    (%rdx,%rax,1),%edi
  movd   %edx,%xmm0
  movslq %esi,%rdx
  movd   %edi,%xmm7
  lea    0x0(,%rax,4),%edi
  lea    (%r12,%rdx,4),%rdx
  movd   %edi,%xmm5
  mov    %ecx,%edi
  punpckldq %xmm7,%xmm0
  shr    $0x2,%edi
  movd   %eax,%xmm7
  pshufd $0x0,%xmm5,%xmm5
  punpckldq %xmm7,%xmm4
  shl    $0x4,%rdi
  pshufd $0x0,%xmm6,%xmm7
  movd   %r14d,%xmm6
  punpcklqdq %xmm0,%xmm4
  pshufd $0x0,%xmm6,%xmm6
  add    %rdx,%rdi
  cs nopw 0x0(%rax,%rax,1)
L343:
  movdqa %xmm4,%xmm0
  movdqa %xmm6,%xmm1
  paddd  %xmm5,%xmm4
  add    $0x10,%rdx
  movdqa %xmm0,%xmm2
  psrad  $0x8,%xmm0
  psrad  $0x10,%xmm2
  pand   %xmm3,%xmm0
  paddd  %xmm7,%xmm2
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rdx,%rdi
  jne    L343
  mov    %ecx,%edx
  mov    %eax,%r10d
  and    $0xfffffffc,%edx
  imul   %edx,%r10d
  mov    %edx,%r9d
  lea    (%rsi,%rdx,1),%edi
  cmp    %edx,%ecx
  je     L171
L54:
  mov    %r10d,%r13d
  mov    %r10d,%edx
  movslq %edi,%rdi
  xor    %r8d,%r8d
  sar    $0x10,%r13d
  movzbl %dh,%edx
  shl    $0x2,%rdi
  add    %r15d,%r13d
  mov    %edx,%r11d
  cmp    %r14d,%r13d
  cmovge %r8d,%r11d
  add    %eax,%r10d
  mov    %r11d,(%r12,%rdi,1)
  lea    0x1(%r9),%r11d
  cmp    %r11d,%ecx
  jle    L171
  mov    %r10d,%r13d
  mov    %r10d,%edx
  sar    $0x10,%r13d
  movzbl %dh,%edx
  add    %r15d,%r13d
  mov    %edx,%r11d
  lea    0x2(%r9),%edx
  cmp    %r14d,%r13d
  cmovge %r8d,%r11d
  add    %r10d,%eax
  mov    %r11d,0x4(%r12,%rdi,1)
  cmp    %ecx,%edx
  jge    L171
  movzbl %ah,%edx
  sar    $0x10,%eax
  add    %r15d,%eax
  cmp    %eax,%r14d
  mov    %r8d,%eax
  cmovg  %edx,%eax
  mov    %eax,0x8(%r12,%rdi,1)
L171:
  add    %ecx,%esi
L474:
  test   %ebp,%ebp
  jle    L131
  movslq %ebp,%rdx
  movslq %esi,%rsi
  lea    (%r12,%rsi,4),%rdi
  shl    $0x2,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  jmp    L131
  cs nopw 0x0(%rax,%rax,1)
L471:
  mov    %ebx,%ebp
  mov    %ebx,%r8d
  sub    %r15d,%ebp
  jmp    L413
  nopl   (%rax)
L303:
  xor    %esi,%esi
  jmp    L112
  nopw   0x0(%rax,%rax,1)
L36:
  cltq
  sub    %rax,%r10
  lea    -0x4(%r12,%r10,4),%rdx
  nopw   0x0(%rax,%rax,1)
L298:
  mov    (%rdx),%esi
  mov    (%r12,%rax,4),%ecx
  add    $0x4,%rdx
  mov    %esi,(%r12,%rax,4)
  sub    $0x1,%rax
  mov    %ecx,-0x4(%rdx)
  cmp    $0xffffffff,%eax
  jne    L298
  jmp    L365
L399:
  xor    %eax,%eax
  jmp    L251
L402:
  xor    %edx,%edx
  jmp    L139
L505:
  mov    %esi,%edi
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  jmp    L54
L93:
  xor    %r10d,%r10d
  mov    %ecx,%edx
  xor    %r8d,%r8d
  jmp    L302
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D10
type: byte[16]
name: extract_symbolic_data
arguments: data_tag: D12
type: byte[16]
name: extract_symbolic_data
arguments: data_tag: D38
type: byte[16]

tool: {"D10": [0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40]}

tool: {"D12": [0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00]}

tool: {"D38": [0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00]}

assistant: ```c
int *__imlib_CalcApoints(int s, int d, int b1, int b2, int up) {
  int *p, i, j = 0, rv = 0;
  if (d < 0) {
    rv = 1;
    d = -d;
  }
  p = malloc(d * sizeof(int));
  if (d < (b1 + b2)) {
    if (d < b1) {
      b1 = d;
      b2 = 0;
    } else
      b2 = d - b1;
  }
  if (up) {
    int val, inc;
    for (i = 0; i < b1; i++)
      p[j++] = 0;
    if (d > (b1 + b2)) {
      int ss, dd;
      ss = s - b1 - b2;
      dd = d - b1 - b2;
      val = 0;
      inc = (ss << 16) / dd;
      for (i = 0; i < dd; i++) {
        p[j++] = (val >> 8) - ((val >> 8) & 0xffffff00);
        if (((val >> 16) + b1) >= (s - 1))
          p[j - 1] = 0;
        val += inc;
      }
    }
    for (i = 0; i < b2; i++)
      p[j++] = 0;
  } else {
    int val, inc;
    for (i = 0; i < b1; i++)
      p[j++] = (1 << (16 + 14)) + (1 << 14);
    if (d > (b1 + b2)) {
      int ss, dd, ap, Cp;
      ss = s - b1 - b2;
      dd = d - b1 - b2;
      val = 0;
      inc = (ss << 16) / dd;
      Cp = ((dd << 14) / ss) + 1;
      for (i = 0; i < dd; i++) {
        ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8;
        p[j] = ap | (Cp << 16);
        j++;
        val += inc;
      }
    }
    for (i = 0; i < b2; i++)
      p[j++] = (1 << (16 + 14)) + (1 << 14);
  }
  if (rv) {
    for (i = d / 2; --i >= 0;) {
      int tmp = p[i];
      p[i] = p[d - i - 1];
      p[d - i - 1] = tmp;
    }
  }
  return p;
}
```