user: What is the c source code of the assembly code below:

```asm
<BASM_XCallGenRepackSigSysV>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  cmpb   $0x28,(%rdi)
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbp
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L515
  cmp    $0x29,%al
  je     L515
  mov    $0x0,%r14d
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r15d
  mov    $0x0,%r12d
  lea    D378(%rip),%r13
  jmp    L412
  cmp    $0x5,%r15d
  jg     L244
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
  mov    %rbx,%rbp
  jmp    L335
L244:
  lea    0x10(,%r12,8),%esi
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D258(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  mov    %rbx,%rbp
  jmp    L335
  cmp    $0x5,%r15d
  jg     L238
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
  mov    %rbx,%rbp
  jmp    L335
L238:
  lea    0x10(,%r12,8),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D372(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  mov    %rbx,%rbp
  jmp    L335
  cmp    $0x5,%r15d
  jg     L223
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
  mov    %rbx,%rbp
  jmp    L335
L223:
  lea    0x10(,%r12,8),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D372(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  mov    %rbx,%rbp
  jmp    L335
  cmp    $0x5,%r15d
  jg     L633
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
L534:
  movzbl 0x1(%rbp),%eax
  cmp    $0x50,%al
  jne    L55
L299:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x50,%al
  je     L299
L55:
  lea    -0x61(%rax),%edx
  lea    0x1(%rbx),%rbp
  cmp    $0x19,%dl
  jbe    L335
  mov    %rbx,%rbp
  cmp    $0x58,%al
  jne    L335
  movzbl (%rbx),%eax
  test   %al,%al
  je     L439
  cmp    $0x3b,%al
  je     L439
L567:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L439
  cmp    $0x3b,%al
  jne    L567
L439:
  cmp    $0x3b,%al
  sete   %bpl
  movzbl %bpl,%ebp
  add    %rbx,%rbp
  jmp    L335
L633:
  lea    0x10(,%r12,8),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D372(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  jmp    L534
  cmp    $0x5,%r15d
  jg     L117
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
L420:
  movzbl 0x1(%rbp),%eax
  cmp    $0x51,%al
  jne    L287
L233:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x51,%al
  je     L233
L287:
  lea    -0x61(%rax),%edx
  lea    0x1(%rbx),%rbp
  cmp    $0x19,%dl
  jbe    L335
  mov    %rbx,%rbp
  cmp    $0x4c,%al
  jne    L335
  movzbl (%rbx),%eax
  test   %al,%al
  je     L644
  cmp    $0x3b,%al
  je     L644
L77:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L644
  cmp    $0x3b,%al
  jne    L77
L644:
  cmp    $0x3b,%al
  sete   %bpl
  movzbl %bpl,%ebp
  add    %rbx,%rbp
  jmp    L335
L117:
  lea    0x10(,%r12,8),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D372(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  jmp    L420
  cmp    $0x5,%r15d
  jg     L160
  lea    0x10(,%r12,8),%edx
  movslq %r15d,%rcx
  lea    D1(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D353(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r15d
L334:
  movzbl 0x1(%rbp),%eax
  test   %al,%al
  je     L468
  cmp    $0x3b,%al
  je     L468
L125:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L468
  cmp    $0x3b,%al
  jne    L125
L468:
  cmp    $0x3b,%al
  sete   %bpl
  movzbl %bpl,%ebp
  add    %rbx,%rbp
  jmp    L335
L160:
  lea    0x10(,%r12,8),%esi
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D372(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  jmp    L334
  mov    0xc(%rsp),%ebp
  cmp    $0x7,%ebp
  jg     L75
  lea    0x10(,%r12,8),%edx
  movslq %ebp,%rcx
  lea    D131(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D32(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%ebp
  mov    %ebp,0xc(%rsp)
  mov    %rbx,%rbp
  jmp    L335
L75:
  lea    0x10(,%r12,8),%esi
  lea    D365(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D274(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  mov    %rbx,%rbp
  jmp    L335
  mov    0xc(%rsp),%ebp
  cmp    $0x7,%ebp
  jg     L301
  mov    %r12d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r12d
  add    $0x2,%r12d
  lea    0x0(,%r12,8),%edx
  movslq %ebp,%rcx
  lea    D131(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D337(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%ebp
  mov    %ebp,0xc(%rsp)
  mov    %rbx,%rbp
  jmp    L335
L301:
  mov    %r12d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r12d
  mov    %r14d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r14d
  add    $0x2,%r12d
  lea    0x0(,%r12,8),%esi
  lea    D415(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D291(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x2,%r14d
  mov    %rbx,%rbp
  jmp    L335
  mov    0xc(%rsp),%ebp
  cmp    $0x7,%ebp
  jg     L69
  lea    0x10(,%r12,8),%edx
  movslq %ebp,%rcx
  lea    D131(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D48(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%ebp
  mov    %ebp,0xc(%rsp)
  mov    %rbx,%rbp
  jmp    L335
L69:
  lea    0x10(,%r12,8),%esi
  lea    D168(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D312(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%r12d
  add    $0x1,%r14d
  mov    %rbx,%rbp
  jmp    L335
  mov    0xc(%rsp),%ebp
  cmp    $0x7,%ebp
  jg     L384
  mov    %r12d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r12d
  add    $0x2,%r12d
  lea    0x0(,%r12,8),%edx
  movslq %ebp,%rcx
  lea    D131(%rip),%rax
  mov    (%rax,%rcx,8),%rsi
  lea    D337(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x1,%ebp
  mov    %ebp,0xc(%rsp)
  mov    %rbx,%rbp
  jmp    L335
L384:
  mov    %r12d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r12d
  mov    %r14d,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    $0xffffffff,%r14d
  add    $0x2,%r12d
  lea    0x0(,%r12,8),%esi
  lea    D415(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  lea    0x0(,%r14,8),%esi
  lea    D291(%rip),%rdi
  mov    $0x0,%eax
  call   <basm_print@plt>
  add    $0x2,%r14d
  mov    %rbx,%rbp
  jmp    L335
  lea    0x2(%rbp),%rdx
  movzbl 0x1(%rbp),%eax
  sub    $0x64,%eax
  cmp    $0x7,%al
  ja     L513
  movzbl %al,%eax
  lea    D210(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  add    $0x8,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x10,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x20,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x20,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x4,%r12d
  mov    %rdx,%rbp
  jmp    L335
  lea    0x2(%rbp),%rdx
  movzbl 0x1(%rbp),%eax
  sub    $0x64,%eax
  cmp    $0x7,%al
  ja     L558
  movzbl %al,%eax
  lea    D326(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  add    $0x4,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x8,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0xc,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x10,%r12d
  mov    %rdx,%rbp
  jmp    L335
  add    $0x4,%r12d
  mov    %rdx,%rbp
  jmp    L335
L516:
  mov    %rbx,%rbp
L335:
  movzbl 0x0(%rbp),%eax
  test   %al,%al
  je     L687
  cmp    $0x29,%al
  je     L687
L412:
  lea    0x1(%rbp),%rbx
  sub    $0x43,%eax
  cmp    $0x36,%al
  ja     L516
  movzbl %al,%eax
  movslq 0x0(%r13,%rax,4),%rax
  add    %r13,%rax
  notrack jmp *%rax
L513:
  mov    %rdx,%rbp
  jmp    L335
L558:
  mov    %rdx,%rbp
  jmp    L335
L515:
  mov    $0x0,%r12d
L687:
  mov    %r12d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D353
type_infered: string
name: parse_data
arguments: data_tag: D25
type_infered: string
name: parse_data
arguments: data_tag: D258
type_infered: string
name: parse_data
arguments: data_tag: D64
type_infered: string
name: parse_data
arguments: data_tag: D372
type_infered: string
name: parse_data
arguments: data_tag: D32
type_infered: string
name: parse_data
arguments: data_tag: D365
type_infered: string
name: parse_data
arguments: data_tag: D274
type_infered: string
name: parse_data
arguments: data_tag: D337
type_infered: string
name: parse_data
arguments: data_tag: D415
type_infered: string
name: parse_data
arguments: data_tag: D291
type_infered: string
name: parse_data
arguments: data_tag: D48
type_infered: string
name: parse_data
arguments: data_tag: D168
type_infered: string
name: parse_data
arguments: data_tag: D312
type_infered: string

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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);
}
```