// File: /workspace/github_c_makefile_star2_O3/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, 0xc4e3(%rip)    # 0x15810
movq 0xe51c(%rip), %rax      # 0x17850
movl $0x0, 0xe5aa(%rip)      # 0x178e8
movq 0xe51b(%rip), %rcx      # 0x17860
movb $0x0, (%rax,%rcx)
cmpb $0x0, (%rax)
je 0x9397
xorl %r15d, %r15d
leaq 0xe4f0(%rip), %rcx      # 0x17848
movq %rax, 0x20(%rcx,%r15,8)
incq %r15
incq %rax
movzbl -0x1(%rax), %edx
testl %edx, %edx
je 0x9380
cmpl $0x3b, %edx
jne 0x9360
movb $0x0, -0x1(%rax)
cmpq $0x10, %r15
jne 0x9358
movl $0x10, %r15d
movl %r15d, 0xe561(%rip)     # 0x178e8
movq 0xe4da(%rip), %rdi      # 0x17868
callq 0x54b0
movl %eax, %ebx
jmp 0x939c
xorl %r15d, %r15d
xorl %ebx, %ebx
movzbl 0xe4a5(%rip), %eax      # 0x17848
cmpl $0x5d, %eax
jle 0x93d3
leal -0x5e(%rax), %ecx
cmpl $0x2, %ecx
jb 0x9527
cmpl $0x6b, %eax
jne 0x9522
movq 0xe4a4(%rip), %rdi      # 0x17868
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa7a7
cmpl $0x50, %eax
je 0x9527
cmpl $0x5d, %eax
jne 0x9522
cmpl $0x4, %ebx
ja 0x9417
movl %ebx, %eax
leaq 0x4ec1(%rip), %rcx      # 0xe2b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2, %r15d
jl 0x9527
movq 0xe463(%rip), %rdi      # 0x17870
callq 0xa7a7
jmp 0x94c3
cmpl $0x34, %ebx
je 0x94d9
cmpl $0x68, %ebx
jne 0x9522
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
cmpl $0x2, %r15d
jge 0x944a
jmp 0x9458
cmpl $0x3, %r15d
jl 0x9522
movq 0xe42e(%rip), %r14      # 0x17878
movq 0xe41f(%rip), %rdi      # 0x17870
callq 0x54b0
movl %eax, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0xa331
testl %eax, %eax
je 0x9513
cmpl $0x1, %r15d
jg 0x9479
cmpl $0x68, %ebx
je 0x9527
movq 0xbb70(%rip), %rax      # 0x14ff0
movq (%rax), %rdi
testq %r14, %r14
leaq 0x53ac(%rip), %rcx      # 0xe839
cmovneq %r14, %rcx
leaq 0x537f(%rip), %rsi      # 0xe817
movl %ebp, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5850
cmpl $0x2, %r15d
jl 0x9527
movq 0xe3b8(%rip), %rdi      # 0x17870
jmp 0x93c4
cmpl $0x2, %r15d
jl 0x9527
movq 0xe3a6(%rip), %rdi      # 0x17870
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa72f
cmpl $0x3, %r15d
jl 0x9527
leaq 0xe6b2(%rip), %rax      # 0x17b98
cmpl $0x0, (%rax)
je 0x9527
movq 0xe386(%rip), %rdi      # 0x17878
callq 0x95c2
testq %rax, %rax
je 0x9532
movq %rax, %rdi
callq 0xa046
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9fe4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7bd6
callq 0x5c25
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x5c09
jmp 0x9527