// File: /workspace/github_c_makefile_star2_O2/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, %r15d
movq %rsi, (%rsp)
movq %rdi, %r13
cmpb $0x6f, %bl
jg 0x2543
testq %r13, %r13
jne 0x2543
testq %r14, %r14
jne 0x2543
movslq %ebx, %rax
leaq 0x271a(%rip), %rcx      # 0x4c50
movq -0x200(%rcx,%rax,8), %r12
xorl %r13d, %r13d
jmp 0x257e
testq %r13, %r13
je 0x2578
cmpb $0x3f, (%r13)
jne 0x257b
xorl %r12d, %r12d
testq %r14, %r14
jne 0x257e
cmpb $0x0, 0x1(%r13)
jne 0x257e
movsbl %bl, %eax
cmpl $0x6c, %eax
je 0x2700
cmpl $0x68, %eax
jne 0x257b
leaq 0xbb1(%rip), %r12       # 0x3127
jmp 0x253e
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpb $0x6f, %bl
jg 0x25ab
testq %r14, %r14
jne 0x25ab
testq %r13, %r13
jne 0x25ab
leal -0x40(%rbx), %eax
movzbl %al, %eax
movabsq $0xef8ffdfffe99, %rcx   # imm = 0xEF8FFDFFFE99
btq %rax, %rcx
jb 0x25ab
pushq $0xa
popq %rdi
callq 0x2040
movq 0x2afe(%rip), %rsi      # 0x50b0
testq %r12, %r12
je 0x25ca
leaq 0xa6c(%rip), %rdi       # 0x302a
movq %r12, %rdx
xorl %eax, %eax
callq 0x2090
jmp 0x25d8
leaq 0xb62(%rip), %rdi       # 0x3133
xorl %eax, %eax
callq 0x2090
movq %r12, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
testq %r13, %r13
je 0x2604
cmpb $0x0, (%r13)
je 0x2604
leaq 0xb3f(%rip), %rdi       # 0x3139
movq %r13, %rsi
xorl %eax, %eax
callq 0x2090
movq (%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
leaq 0xbe1(%rip), %r14       # 0x31f9
leaq 0xb1e(%rip), %rbx       # 0x313d
leaq 0xb19(%rip), %r12       # 0x313f
xorl %ebp, %ebp
cmpl %r15d, %ebp
jge 0x269c
testl %ebp, %ebp
movq %rbx, %rdi
cmoveq %r14, %rdi
xorl %eax, %eax
callq 0x2090
movslq %ebp, %rcx
movq (%rsp), %rax
movq (%rax,%rcx,8), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jne 0x265a
pushq $0x2a
popq %rdi
callq 0x2040
jmp 0x2698
movl %r15d, %r13d
movq 0x20(%rsp), %rdx
leaq (%rdx,%rcx,8), %r15
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
testl %eax, %eax
jns 0x2687
movq %r12, %rdi
xorl %eax, %eax
callq 0x2090
movq (%r15), %rax
incl %ebp
addq $0x8, %r15
jmp 0x2666
leaq 0xab6(%rip), %rdi       # 0x3144
xorl %eax, %eax
callq 0x2090
movl %r13d, %r15d
incl %ebp
jmp 0x2628
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x26b9
cmpb $0x0, (%rsi)
je 0x26b9
leaq 0xa87(%rip), %rdi       # 0x3139
xorl %eax, %eax
callq 0x2090
movq 0x29f8(%rip), %rdx      # 0x50b8
cmpq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rsi
je 0x26e0
leaq 0xa66(%rip), %rdi       # 0x313a
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x26ee
leaq 0xa61(%rip), %rdi       # 0x3148
xorl %eax, %eax
callq 0x2090
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa26(%rip), %r12       # 0x312d
jmp 0x253e