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

```asm
<BASM_XCallGenRepackSigSysV>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  movzbl (%rdi),%eax
  cmp    $0x28,%al
  jne    L153
  movzbl 0x1(%rdi),%eax
  add    $0x1,%r15
L153:
  test   %al,%al
  je     L58
  cmp    $0x29,%al
  je     L58
  movl   $0x0,0xc(%rsp)
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  xor    %r13d,%r13d
  lea    D64(%rip),%r14
  nopw   0x0(%rax,%rax,1)
L266:
  sub    $0x43,%eax
  lea    0x1(%r15),%r12
  cmp    $0x36,%al
  ja     L174
  movzbl %al,%eax
  movslq (%r14,%rax,4),%rax
  add    %r14,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x5,%ebp
  jle    L373
  mov    %edx,%esi
  lea    D120(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D15(%rip),%rdi
L241:
  xor    %eax,%eax
  add    $0x1,%ebx
  call   <basm_print@plt>
L174:
  movzbl 0x1(%r15),%eax
L459:
  test   %al,%al
  mov    %r12,%r15
  setne  %dl
L212:
  cmp    $0x29,%al
  je     L120
  test   %dl,%dl
  jne    L266
L120:
  add    $0x18,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x5,%ebp
  jg     L164
L373:
  movslq %ebp,%rsi
  lea    D285(%rip),%rax
  add    $0x1,%ebp
  mov    (%rax,%rsi,8),%rsi
  lea    D317(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  movzbl 0x1(%r15),%eax
  mov    %r12,%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  nopl   0x0(%rax,%rax,1)
  mov    0xc(%rsp),%ecx
  mov    %r13d,%eax
  and    $0x1,%eax
  cmp    $0x7,%ecx
  jg     L507
  lea    0x2(%rax,%r13,1),%r13d
  movslq %ecx,%rsi
  lea    D85(%rip),%rax
  mov    (%rax,%rsi,8),%rsi
  lea    0x0(,%r13,8),%edx
  lea    D69(%rip),%rdi
L101:
  xor    %eax,%eax
  call   <basm_print@plt>
  movzbl 0x1(%r15),%eax
  addl   $0x1,0xc(%rsp)
  mov    %r12,%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  nopl   0x0(%rax,%rax,1)
  mov    0xc(%rsp),%eax
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x7,%eax
  jg     L574
  movslq %eax,%rsi
  lea    D85(%rip),%rax
  lea    D132(%rip),%rdi
  mov    (%rax,%rsi,8),%rsi
  jmp    L101
  mov    0xc(%rsp),%eax
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x7,%eax
  jg     L220
  movslq %eax,%rsi
  lea    D85(%rip),%rax
  lea    D251(%rip),%rdi
  mov    (%rax,%rsi,8),%rsi
  jmp    L101
  nopl   0x0(%rax,%rax,1)
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x5,%ebp
  jle    L108
  mov    %edx,%esi
  lea    D120(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D15(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  add    $0x1,%ebx
L10:
  movzbl 0x1(%r15),%eax
  cmp    $0x51,%al
  jne    L405
  xchg   %ax,%ax
L374:
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  cmp    $0x51,%al
  je     L374
L405:
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  jbe    L18
  test   %al,%al
  mov    %r12,%r15
  setne  %dl
  cmp    $0x4c,%al
  jne    L212
  jmp    L389
  nop
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x5,%ebp
  jle    L316
  mov    %edx,%esi
  lea    D120(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D15(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  add    $0x1,%ebx
L166:
  movzbl 0x1(%r15),%eax
  cmp    $0x50,%al
  jne    L93
  cs nopw 0x0(%rax,%rax,1)
L457:
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  cmp    $0x50,%al
  je     L457
L93:
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  jbe    L18
  cmp    $0x58,%al
  movzbl (%r12),%eax
  jne    L459
  cmp    $0x3b,%al
  je     L18
  test   %al,%al
  jne    L244
  jmp    L233
  nopl   (%rax)
L455:
  cmp    $0x3b,%al
  je     L18
L244:
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  test   %al,%al
  jne    L455
  xchg   %ax,%ax
L233:
  cmp    $0x3b,%al
  je     L18
  movzbl (%r12),%eax
  mov    %r12,%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  cs nopw 0x0(%rax,%rax,1)
  lea    0x10(,%r13,8),%edx
  add    $0x1,%r13d
  cmp    $0x5,%ebp
  jle    L571
  mov    %edx,%esi
  lea    D120(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D15(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  add    $0x1,%ebx
L440:
  movzbl 0x1(%r15),%eax
  test   %al,%al
  jne    L242
  jmp    L233
  nopl   0x0(%rax,%rax,1)
L471:
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  test   %al,%al
  je     L233
L242:
  cmp    $0x3b,%al
  jne    L471
L18:
  movzbl 0x1(%r12),%eax
  lea    0x1(%r12),%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  nopw   0x0(%rax,%rax,1)
  movzbl 0x2(%r15),%eax
  movzbl 0x1(%r15),%ecx
  lea    0x2(%r15),%rsi
  test   %al,%al
  setne  %dl
  sub    $0x64,%ecx
  cmp    $0x7,%cl
  ja     L531
  lea    D128(%rip),%rdi
  movzbl %cl,%ecx
  movslq (%rdi,%rcx,4),%rcx
  add    %rdi,%rcx
  notrack jmp *%rcx
  nopl   0x0(%rax,%rax,1)
  movzbl 0x2(%r15),%eax
  movzbl 0x1(%r15),%ecx
  lea    0x2(%r15),%rsi
  test   %al,%al
  setne  %dl
  sub    $0x64,%ecx
  cmp    $0x7,%cl
  ja     L531
  lea    D161(%rip),%rdi
  movzbl %cl,%ecx
  movslq (%rdi,%rcx,4),%rcx
  add    %rdi,%rcx
  notrack jmp *%rcx
  nopl   0x0(%rax,%rax,1)
L507:
  cmp    $0x1,%eax
  mov    %ebx,%eax
  lea    D284(%rip),%rdi
  sbb    $0xffffffff,%r13d
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%ebx
  add    $0x2,%r13d
  xor    %eax,%eax
  lea    0x0(,%r13,8),%esi
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  xor    %eax,%eax
  lea    D108(%rip),%rdi
  call   <basm_print@plt>
  movzbl 0x1(%r15),%eax
  add    $0x2,%ebx
  mov    %r12,%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  cs nopw 0x0(%rax,%rax,1)
L571:
  movslq %ebp,%rsi
  lea    D285(%rip),%rax
  add    $0x1,%ebp
  mov    (%rax,%rsi,8),%rsi
  lea    D317(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  jmp    L440
  nopl   0x0(%rax)
L316:
  movslq %ebp,%rsi
  lea    D285(%rip),%rax
  add    $0x1,%ebp
  mov    (%rax,%rsi,8),%rsi
  lea    D317(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  jmp    L166
  nopl   0x0(%rax)
L114:
  test   %dl,%dl
  je     L141
L389:
  mov    %r12,%rsi
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  test   %al,%al
  setne  %dl
  cmp    $0x3b,%al
  jne    L114
L141:
  mov    %r12,%r15
  cmp    $0x3b,%al
  jne    L212
  movzbl 0x1(%r12),%eax
  lea    0x2(%rsi),%r15
  test   %al,%al
  setne  %dl
  jmp    L212
  nopl   0x0(%rax)
L108:
  movslq %ebp,%rsi
  lea    D285(%rip),%rax
  add    $0x1,%ebp
  mov    (%rax,%rsi,8),%rsi
  lea    D317(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  jmp    L10
  nopl   0x0(%rax)
L220:
  mov    %edx,%esi
  lea    D100(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D0(%rip),%rdi
  jmp    L241
  nopl   0x0(%rax,%rax,1)
L574:
  mov    %edx,%esi
  lea    D278(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D271(%rip),%rdi
  jmp    L241
  nopl   0x0(%rax,%rax,1)
L164:
  mov    %edx,%esi
  lea    D188(%rip),%rdi
  xor    %eax,%eax
  call   <basm_print@plt>
  lea    0x0(,%rbx,8),%esi
  lea    D112(%rip),%rdi
  jmp    L241
  nopl   0x0(%rax,%rax,1)
  add    $0x4,%r13d
  mov    %rsi,%r15
  jmp    L212
  nopl   0x0(%rax)
  add    $0x20,%r13d
  mov    %rsi,%r15
  jmp    L212
  nopl   0x0(%rax)
L531:
  mov    %rsi,%r15
  jmp    L212
  nopl   0x0(%rax,%rax,1)
  add    $0x8,%r13d
  mov    %rsi,%r15
  jmp    L212
  nopl   0x0(%rax)
  add    $0x10,%r13d
  mov    %rsi,%r15
  jmp    L212
  add    $0xc,%r13d
  mov    %rsi,%r15
  jmp    L212
  nopl   0x0(%rax,%rax,1)
L58:
  xor    %r13d,%r13d
  jmp    L120
```

tool_calls: name: unpack_data
arguments: data_tag: D120
data_type: string
name: unpack_data
arguments: data_tag: D15
data_type: string
name: unpack_data
arguments: data_tag: D317
data_type: string
name: unpack_data
arguments: data_tag: D69
data_type: string
name: unpack_data
arguments: data_tag: D132
data_type: string
name: unpack_data
arguments: data_tag: D251
data_type: string
name: unpack_data
arguments: data_tag: D284
data_type: string
name: unpack_data
arguments: data_tag: D108
data_type: string
name: unpack_data
arguments: data_tag: D100
data_type: string
name: unpack_data
arguments: data_tag: D0
data_type: string
name: unpack_data
arguments: data_tag: D278
data_type: string
name: unpack_data
arguments: data_tag: D271
data_type: string
name: unpack_data
arguments: data_tag: D188
data_type: string
name: unpack_data
arguments: data_tag: D112
data_type: string

tool: D120: mov rax, [rbp+%d]


tool: D15: mov [rsp+%d], rax


tool: D317: mov %s, [rbp+%d]


tool: D69: movdqa %s, [rbp+%d]


tool: D132: movss %s, [rbp+%d]


tool: D251: movsd %s, [rbp+%d]


tool: D284: movdqa xmm8, [rbp+%d]


tool: D108: movdqa [rsp+%d], xmm8


tool: D100: movsd xmm8, [rbp+%d]


tool: D0: movsd [rsp+%d], xmm8


tool: D278: movss xmm8, [rbp+%d]


tool: D271: movss [rsp+%d], xmm8


tool: D188: mov eax, [rbp+%d]


tool: D112: mov [rsp+%d], eax


assistant: ```c
int BASM_XCallGenRepackSigSysV(char *sig) {
  static char *gregs[6] = {"rdi", "rsi", "rdx", "rcx", "r8", "r9"};
  static char *xregs[8] = {"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"};
  char *s;
  int i, j, ni, nx, ns;
  s = sig;
  i = 0;
  j = 0;
  ni = 0;
  nx = 0;
  ns = 0;
  if (*s == '(')
    s++;
  while (*s && (*s != ')')) {
    switch (*s++) {
    case 'a':
    case 'b':
    case 'c':
    case 'h':
    case 's':
    case 't':
    case 'w':
    case 'i':
    case 'j':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
        break;
      }
      basm_print("mov eax, [rbp+%d]\n", (i + 2) * 8);
      basm_print("mov [rsp+%d], eax\n", ns * 8);
      i++;
      ns++;
      break;
    case 'l':
    case 'm':
    case 'x':
    case 'y':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
        break;
      }
      basm_print("mov rax, [rbp+%d]\n", (i + 2) * 8);
      basm_print("mov [rsp+%d], rax\n", ns * 8);
      i++;
      ns++;
      break;
    case 'r':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
        break;
      }
      basm_print("mov rax, [rbp+%d]\n", (i + 2) * 8);
      basm_print("mov [rsp+%d], rax\n", ns * 8);
      i++;
      ns++;
      break;
    case 'P':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
      } else {
        basm_print("mov rax, [rbp+%d]\n", (i + 2) * 8);
        basm_print("mov [rsp+%d], rax\n", ns * 8);
        i++;
        ns++;
      }
      while (*s == 'P')
        s++;
      if ((*s >= 'a') && (*s <= 'z')) {
        s++;
        break;
      }
      if (*s == 'X') {
        while (*s && *s != ';')
          s++;
        if (*s == ';')
          s++;
      }
      break;
    case 'Q':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
      } else {
        basm_print("mov rax, [rbp+%d]\n", (i + 2) * 8);
        basm_print("mov [rsp+%d], rax\n", ns * 8);
        i++;
        ns++;
      }
      while (*s == 'Q')
        s++;
      if ((*s >= 'a') && (*s <= 'z')) {
        s++;
        break;
      }
      if (*s == 'L') {
        while (*s && *s != ';')
          s++;
        if (*s == ';')
          s++;
      }
      break;
    case 'L':
      if (ni < 6) {
        basm_print("mov %s, [rbp+%d]\n", gregs[ni], (i + 2) * 8);
        i++;
        ni++;
      } else {
        basm_print("mov rax, [rbp+%d]\n", (i + 2) * 8);
        basm_print("mov [rsp+%d], rax\n", ns * 8);
        i++;
        ns++;
      }
      while (*s && *s != ';')
        s++;
      if (*s == ';')
        s++;
      break;
    case 'd':
      if (nx < 8) {
        basm_print("movsd %s, [rbp+%d]\n", xregs[nx], (i + 2) * 8);
        i++;
        nx++;
        break;
      }
      basm_print("movsd xmm8, [rbp+%d]\n", (i + 2) * 8);
      basm_print("movsd [rsp+%d], xmm8\n", ns * 8);
      i++;
      ns++;
      break;
    case 'e':
      if (nx < 8) {
        if (i & 1)
          i++;
        basm_print("movdqa %s, [rbp+%d]\n", xregs[nx], (i + 2) * 8);
        i += 2;
        nx++;
        break;
      }
      if (i & 1)
        i++;
      if (ns & 1)
        ns++;
      basm_print("movdqa xmm8, [rbp+%d]\n", (i + 2) * 8);
      basm_print("movdqa [rsp+%d], xmm8\n", ns * 8);
      i += 2;
      ns += 2;
      break;
    case 'f':
    case 'k':
      if (nx < 8) {
        basm_print("movss %s, [rbp+%d]\n", xregs[nx], (i + 2) * 8);
        i++;
        nx++;
        break;
      }
      basm_print("movss xmm8, [rbp+%d]\n", (i + 2) * 8);
      basm_print("movss [rsp+%d], xmm8\n", ns * 8);
      i++;
      ns++;
      break;
    case 'g':
    case 'n':
    case 'o':
      if (nx < 8) {
        if (i & 1)
          i++;
        basm_print("movdqa %s, [rbp+%d]\n", xregs[nx], (i + 2) * 8);
        i += 2;
        nx++;
        break;
      }
      if (i & 1)
        i++;
      if (ns & 1)
        ns++;
      basm_print("movdqa xmm8, [rbp+%d]\n", (i + 2) * 8);
      basm_print("movdqa [rsp+%d], xmm8\n", ns * 8);
      i += 2;
      ns += 2;
      break;
    case 'C':
      switch (*s++) {
      case 'f':
        i += 8;
        break;
      case 'd':
        i += 16;
        break;
      case 'e':
        i += 32;
        break;
      case 'g':
        i += 32;
        break;
      case 'k':
        i += 4;
        break;
      }
      break;
    case 'G':
      switch (*s++) {
      case 'f':
        i += 4;
        break;
      case 'd':
        i += 8;
        break;
      case 'e':
        i += 12;
        break;
      case 'g':
        i += 16;
        break;
      case 'k':
        i += 4;
        break;
      }
      break;
    default:
      break;
    }
  }
  if (*s && *s == ')')
    s++;
  return (i);
}
```