// File: /workspace/github_c_makefile_star2_O1/neovim[P]libvterm/bin/vterm-dump.c
// Function: parser_csi
static int parser_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)
{
  const char *name = NULL;
  if(!leader && !intermed && command < 0x70)
    name = name_csi_plain[command - 0x40];
  else if(leader && streq(leader, "?") && !intermed) {
    /* DEC */
    switch(command) {
      case 'h': name = "DECSM"; break;
      case 'l': name = "DECRM"; break;
    }
    if(name)
      leader = NULL;
  }

  if(!leader && !intermed && command < 0x70 && newline_csi_plain[command - 0x40])
    printf("\n");

  if(name)
    printf("%s%s", special_begin, name);
  else
    printf("%sCSI", special_begin);

  if(leader && leader[0])
    printf(" %s", leader);

  for(int i = 0; i < argcount; i++) {
    printf(i ? "," : " ");

    if(args[i] == CSI_ARG_MISSING)
      printf("*");
    else {
      while(CSI_ARG_HAS_MORE(args[i]))
        printf("%ld+", CSI_ARG(args[i++]));
      printf("%ld", CSI_ARG(args[i]));
    }
  }

  if(intermed && intermed[0])
    printf(" %s", intermed);

  if(name)
    printf("%s", special_end);
  else
    printf(" %c%s", command, special_end);

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r13
cmpb $0x6f, %bl
jg 0x257d
testq %r13, %r13
jne 0x257d
testq %r14, %r14
jne 0x257d
movslq %ebx, %rax
leaq 0x26dd(%rip), %rcx      # 0x4c50
movq -0x200(%rcx,%rax,8), %r12
jmp 0x25d7
testq %r13, %r13
je 0x25b3
leaq 0xba0(%rip), %rsi       # 0x3129
movq %r13, %rdi
callq 0x20d0
xorl %r12d, %r12d
testq %r14, %r14
jne 0x25d7
testl %eax, %eax
jne 0x25d7
movsbl %bl, %eax
cmpl $0x6c, %eax
je 0x25bb
cmpl $0x68, %eax
jne 0x25c6
leaq 0xb7a(%rip), %r12       # 0x312b
jmp 0x25c2
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x25d7
leaq 0xb6f(%rip), %r12       # 0x3131
xorl %eax, %eax
jmp 0x25cb
movb $0x1, %al
xorl %r12d, %r12d
xorl %ecx, %ecx
testb %al, %al
cmoveq %rcx, %r13
cmovneq %rcx, %r12
cmpb $0x6f, %bl
jg 0x2606
testq %r14, %r14
jne 0x2606
testq %r13, %r13
jne 0x2606
leal -0x40(%rbx), %eax
movzbl %al, %eax
movabsq $0xef8ffdfffe99, %rcx   # imm = 0xEF8FFDFFFE99
btq %rax, %rcx
jb 0x2606
movl $0xa, %edi
callq 0x2040
movq 0x2aab(%rip), %rsi      # 0x50b8
testq %r12, %r12
movq %r14, 0x10(%rsp)
je 0x262a
leaq 0xa0e(%rip), %rdi       # 0x302c
movq %r12, %rdx
xorl %eax, %eax
callq 0x2090
jmp 0x2638
leaq 0xb06(%rip), %rdi       # 0x3137
xorl %eax, %eax
callq 0x2090
movq %r12, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
testq %r13, %r13
je 0x265f
cmpb $0x0, (%r13)
je 0x265f
leaq 0xae8(%rip), %rdi       # 0x313d
movq %r13, %rsi
xorl %eax, %eax
callq 0x2090
testl %ebp, %ebp
jle 0x270f
leaq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
leaq 0xb86(%rip), %r12       # 0x31fd
leaq 0xac3(%rip), %r14       # 0x3141
leaq 0xabe(%rip), %rbx       # 0x3143
xorl %r13d, %r13d
testl %r13d, %r13d
movq %r14, %rdi
cmoveq %r12, %rdi
xorl %eax, %eax
callq 0x2090
movslq %r13d, %rax
cmpq $0x7fffffff, (%r15,%rax,8) # imm = 0x7FFFFFFF
jne 0x26b2
movl $0x2a, %edi
callq 0x2040
jmp 0x2703
movl %ebp, %r14d
movq (%r15,%rax,8), %rsi
testl %esi, %esi
jns 0x26e5
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rbp
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2090
movq (%rbp), %rsi
incl %r13d
addq $0x8, %rbp
testl %esi, %esi
js 0x26c6
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0xa56(%rip), %rdi       # 0x3148
xorl %eax, %eax
callq 0x2090
movl %r14d, %ebp
leaq 0xa3e(%rip), %r14       # 0x3141
incl %r13d
cmpl %ebp, %r13d
jl 0x2688
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x272c
cmpb $0x0, (%rsi)
je 0x272c
leaq 0xa18(%rip), %rdi       # 0x313d
xorl %eax, %eax
callq 0x2090
movq 0x298d(%rip), %rdx      # 0x50c0
cmpq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rsi
je 0x2753
leaq 0x9f7(%rip), %rdi       # 0x313e
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x2761
leaq 0x9f2(%rip), %rdi       # 0x314c
xorl %eax, %eax
callq 0x2090
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq