// File: /workspace/github_c_makefile_star2_O1/impact-eintr[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:
			if (narg > 1) {
				xsettitle(strescseq.args[1]);
				xseticontitle(strescseq.args[1]);
			}
			return;
		case 1:
			if (narg > 1)
				xseticontitle(strescseq.args[1]);
			return;
		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 {
				/*
				 * TODO if defaultbg color is changed, borders
				 * are dirty
				 */
				redraw();
			}
			return;
		}
		break;
	case 'k': /* old title set compatibility */
		xsettitle(strescseq.args[0]);
		return;
	case 'P': /* DCS -- Device Control String */
	case '_': /* APC -- Application Program Command */
	case '^': /* PM -- Privacy Message */
		return;
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
andb $-0x15, 0xc839(%rip)    # 0x15820
movq 0xe872(%rip), %rcx      # 0x17860
movl $0x0, 0xe900(%rip)      # 0x178f8
movq 0xe871(%rip), %rax      # 0x17870
movb $0x0, (%rcx,%rax)
cmpb $0x0, (%rcx)
je 0x903e
xorl %eax, %eax
leaq 0xe847(%rip), %rdx      # 0x17858
movq %rcx, 0x20(%rdx,%rax,8)
incq %rax
incq %rcx
movzbl -0x1(%rcx), %esi
testl %esi, %esi
je 0x9038
cmpl $0x3b, %esi
jne 0x9019
movb $0x0, -0x1(%rcx)
cmpq $0x10, %rax
jne 0x9011
movl $0x10, %eax
movl %eax, 0xe8ba(%rip)      # 0x178f8
movl 0xe8b3(%rip), %r15d     # 0x178f8
testl %r15d, %r15d
je 0x905a
movq 0xe827(%rip), %rdi      # 0x17878
callq 0x54b0
movl %eax, %ebx
jmp 0x905c
xorl %ebx, %ebx
movzbl 0xe7f5(%rip), %eax      # 0x17858
cmpl $0x5d, %eax
jle 0x9093
leal -0x5e(%rax), %ecx
cmpl $0x2, %ecx
jb 0x91e7
cmpl $0x6b, %eax
jne 0x91e2
movq 0xe7f4(%rip), %rdi      # 0x17878
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa4b7
cmpl $0x50, %eax
je 0x91e7
cmpl $0x5d, %eax
jne 0x91e2
cmpl $0x4, %ebx
ja 0x90d7
movl %ebx, %eax
leaq 0x51d1(%rip), %rcx      # 0xe284
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2, %r15d
jl 0x91e7
movq 0xe7b3(%rip), %rdi      # 0x17880
callq 0xa4b7
jmp 0x9183
cmpl $0x34, %ebx
je 0x9199
cmpl $0x68, %ebx
jne 0x91e2
xorl %r14d, %r14d
jmp 0x90ff
cmpl $0x3, %r15d
jl 0x91e2
movq 0xe789(%rip), %r14      # 0x17888
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x2, %r15d
jl 0x9118
movq 0xe76f(%rip), %rdi      # 0x17880
callq 0x54b0
movl %eax, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0xa03d
testl %eax, %eax
je 0x91d3
cmpl $0x1, %r15d
jg 0x9139
cmpl $0x68, %ebx
je 0x91e7
movq 0xbeb0(%rip), %rax      # 0x14ff0
movq (%rax), %rdi
testq %r14, %r14
leaq 0x56be(%rip), %rcx      # 0xe80b
cmovneq %r14, %rcx
leaq 0x5691(%rip), %rsi      # 0xe7e9
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5860
cmpl $0x2, %r15d
jl 0x91e7
movq 0xe708(%rip), %rdi      # 0x17880
jmp 0x9084
cmpl $0x2, %r15d
jl 0x91e7
movq 0xe6f6(%rip), %rdi      # 0x17880
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa43a
cmpl $0x3, %r15d
jl 0x91e7
leaq 0xea02(%rip), %rax      # 0x17ba8
cmpl $0x0, (%rax)
je 0x91e7
movq 0xe6d6(%rip), %rdi      # 0x17888
callq 0x9282
testq %rax, %rax
je 0x91f2
movq %rax, %rdi
callq 0x9d4a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9ce8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x79cf
callq 0x5c35
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x5c19
jmp 0x91e7