// File: /workspace/github_c_makefile_star2_O3/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
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
cmpb $0x6f, %r8b
movq %r8, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
jg 0x2588
testq %r12, %r12
jne 0x2588
testq %r14, %r14
jne 0x2588
movslq %r8d, %rax
leaq 0x26d2(%rip), %rcx      # 0x4c50
movq -0x200(%rcx,%rax,8), %r12
jmp 0x25f8
testq %r12, %r12
je 0x25f5
cmpb $0x3f, (%r12)
jne 0x25bc
testq %r14, %r14
jne 0x25bc
cmpb $0x0, 0x1(%r12)
jne 0x25bc
movsbl %r8b, %eax
cmpl $0x68, %eax
je 0x277e
cmpl $0x6c, %eax
jne 0x25bc
leaq 0xb73(%rip), %r12       # 0x312d
jmp 0x25f8
movq 0x2aed(%rip), %rsi      # 0x50b0
leaq 0xb69(%rip), %rdi       # 0x3133
xorl %eax, %eax
callq 0x2090
movb $0x1, %al
movl %eax, 0xc(%rsp)
cmpb $0x0, (%r12)
je 0x2665
leaq 0xb50(%rip), %rdi       # 0x3139
movq %r12, %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x2665
xorl %r12d, %r12d
cmpb $0x70, %r8b
setge %al
testq %r14, %r14
setne %cl
orb %al, %cl
jne 0x262a
leal -0x40(%r8), %eax
movzbl %al, %eax
movabsq $0xef8ffdfffe99, %rcx   # imm = 0xEF8FFDFFFE99
btq %rax, %rcx
jb 0x262a
movl $0xa, %edi
callq 0x2040
movq 0x2a7f(%rip), %rsi      # 0x50b0
testq %r12, %r12
je 0x2651
leaq 0x9ed(%rip), %rdi       # 0x302a
movl $0x0, 0xc(%rsp)
movq %r12, %rdx
xorl %eax, %eax
callq 0x2090
jmp 0x2665
leaq 0xadb(%rip), %rdi       # 0x3133
xorl %eax, %eax
callq 0x2090
movb $0x1, %al
movl %eax, 0xc(%rsp)
testl %ebp, %ebp
jle 0x2719
leaq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
leaq 0xb7c(%rip), %rbx       # 0x31f9
leaq 0xab9(%rip), %r14       # 0x313d
leaq 0xab4(%rip), %r13       # 0x313f
xorl %r12d, %r12d
testl %r12d, %r12d
movq %r14, %rdi
cmoveq %rbx, %rdi
xorl %eax, %eax
callq 0x2090
movslq %r12d, %rax
movq (%r15,%rax,8), %rsi
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
jne 0x26bb
movl $0x2a, %edi
callq 0x2040
jmp 0x270d
movl %ebp, %r14d
movq %r15, %rbp
testl %esi, %esi
jns 0x26ec
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %r15
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %r13, %rdi
xorl %eax, %eax
callq 0x2090
movq (%r15), %rsi
incl %r12d
addq $0x8, %r15
testl %esi, %esi
js 0x26ce
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0xa4b(%rip), %rdi       # 0x3144
xorl %eax, %eax
callq 0x2090
movq %rbp, %r15
movl %r14d, %ebp
leaq 0xa30(%rip), %r14       # 0x313d
incl %r12d
cmpl %ebp, %r12d
jl 0x268e
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x2736
cmpb $0x0, (%rsi)
je 0x2736
leaq 0xa0a(%rip), %rdi       # 0x3139
xorl %eax, %eax
callq 0x2090
movq 0x297b(%rip), %rdx      # 0x50b8
cmpb $0x0, 0xc(%rsp)
je 0x2759
leaq 0x9fd(%rip), %rdi       # 0x3148
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x276a
leaq 0x9da(%rip), %rdi       # 0x313a
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2090
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a2(%rip), %r12       # 0x3127
jmp 0x25f8