// File: /workspace/github_c_makefile_star2_O0/jaimecgomezz[P]st/st.c
// Function: strhandle
void strhandle(void) {
  char *p = NULL, *dec;
  int j, narg, par;

  term.esc &= ~(ESC_STR_END | ESC_STR);
  strparse();
  par = (narg = strescseq.narg) ? atoi(strescseq.args[0]) : 0;

  switch (strescseq.type) {
  case ']': /* OSC -- Operating System Command */
    switch (par) {
    case 0:
    case 1:
    case 2:
      if (narg > 1)
        xsettitle(strescseq.args[1]);
      return;
    case 52:
      if (narg > 2 && allowwindowops) {
        dec = base64dec(strescseq.args[2]);
        if (dec) {
          xsetsel(dec);
          xclipcopy();
        } else {
          fprintf(stderr, "erresc: invalid base64\n");
        }
      }
      return;
    case 4: /* color set */
      if (narg < 3)
        break;
      p = strescseq.args[2];
      /* FALLTHROUGH */
    case 104: /* color reset, here p = NULL */
      j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
      if (xsetcolorname(j, p)) {
        if (par == 104 && narg <= 1)
          return; /* color reset without parameter */
        fprintf(stderr, "erresc: invalid color j=%d, p=%s\n", j,
                p ? p : "(null)");
      } else {
        // >>>>>>>>>>>>>>>>>>>> xclearwin
        // ==================== xclearwin
        /*
         * TODO if defaultbg color is changed, borders
         * are dirty
         */
        // ==================== xclearwin
        // <<<<<<<<<<<<<<<<<<<< xclearwin
        redraw();
      }
      return;
    }
    break;
  case 'k': /* old title set compatibility */
    xsettitle(strescseq.args[0]);
    return;
  case 'P': /* DCS -- Device Control String */
  // >>>>>>>>>>>>>>>>>>>> sync
  // ==================== sync
  // ==================== sync
  // <<<<<<<<<<<<<<<<<<<< sync
  case '_': /* APC -- Application Program Command */
  case '^': /* PM -- Privacy Message */
    return;
  }

  fprintf(stderr, "erresc: unknown str ");
  strdump();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq $0x0, -0x8(%rbp)
movl 0xea6a(%rip), %eax      # 0x18e10
andl $-0x15, %eax
movl %eax, 0xea61(%rip)      # 0x18e10
callq 0xa630
movl 0x10b2e(%rip), %eax     # 0x1aee8
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0xa3d3
movq 0x10a9f(%rip), %rdi     # 0x1ae68
callq 0x5480
movl %eax, -0x20(%rbp)
jmp 0xa3da
xorl %eax, %eax
movl %eax, -0x20(%rbp)
jmp 0xa3da
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movsbl 0x10a61(%rip), %eax     # 0x1ae48
addl $-0x50, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x1b, %eax
ja 0xa577
movq -0x28(%rbp), %rax
leaq 0x7130(%rip), %rcx      # 0x11534
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
subl $0x3, %eax
jb 0xa443
jmp 0xa41a
movl -0x2c(%rbp), %eax
subl $0x4, %eax
je 0xa4b2
jmp 0xa428
movl -0x2c(%rbp), %eax
subl $0x34, %eax
je 0xa45a
jmp 0xa432
movl -0x2c(%rbp), %eax
subl $0x68, %eax
je 0xa4c8
jmp 0xa565
cmpl $0x1, -0x18(%rbp)
jle 0xa455
movq 0x10a20(%rip), %rdi     # 0x1ae70
callq 0xc4c0
jmp 0xa594
cmpl $0x2, -0x18(%rbp)
jle 0xa4ad
leaq 0x10d31(%rip), %rax     # 0x1b198
cmpl $0x0, (%rax)
je 0xa4ad
movq 0x10a05(%rip), %rdi     # 0x1ae78
callq 0xa6f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa493
movq -0x10(%rbp), %rdi
callq 0xbd20
callq 0xbc90
jmp 0xa4ab
movq 0xbb56(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x75ad(%rip), %rsi      # 0x11a51
movb $0x0, %al
callq 0x5840
jmp 0xa4ad
jmp 0xa594
cmpl $0x3, -0x18(%rbp)
jge 0xa4bd
jmp 0xa565
movq 0x109b4(%rip), %rax     # 0x1ae78
movq %rax, -0x8(%rbp)
cmpl $0x1, -0x18(%rbp)
jle 0xa4df
movq 0x1099b(%rip), %rdi     # 0x1ae70
callq 0x5480
movl %eax, -0x30(%rbp)
jmp 0xa4e9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x30(%rbp)
jmp 0xa4e9
movl -0x30(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0xc030
cmpl $0x0, %eax
je 0xa55e
cmpl $0x68, -0x1c(%rbp)
jne 0xa511
cmpl $0x1, -0x18(%rbp)
jg 0xa511
jmp 0xa594
movq 0xbad8(%rip), %rax      # 0x15ff0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xa536
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xa543
leaq 0x754e(%rip), %rax      # 0x11a8b
movq %rax, -0x48(%rbp)
jmp 0xa543
movl -0x34(%rbp), %edx
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rcx
leaq 0x7514(%rip), %rsi      # 0x11a69
movb $0x0, %al
callq 0x5840
jmp 0xa563
callq 0x8420
jmp 0xa594
jmp 0xa577
movq 0x108fa(%rip), %rdi     # 0x1ae68
callq 0xc4c0
jmp 0xa594
jmp 0xa594
movq 0xba72(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x750a(%rip), %rsi      # 0x11a92
movb $0x0, %al
callq 0x5840
callq 0xa870
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)