// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
andb $-0x15, 0xbd1f(%rip)    # 0x14810
movq 0xdd58(%rip), %rax      # 0x16850
andl $0x0, 0xdde9(%rip)      # 0x168e8
movq 0xdd5a(%rip), %rcx      # 0x16860
movb $0x0, (%rax,%rcx)
cmpb $0x0, (%rax)
je 0x8b62
xorl %r15d, %r15d
leaq 0xdd2f(%rip), %rcx      # 0x16848
cmpq $0x10, %r15
je 0x8b56
movq %rax, 0x20(%rcx,%r15,8)
incq %r15
incq %rax
movzbl -0x1(%rax), %edx
cmpl $0x3b, %edx
je 0x8b39
testl %edx, %edx
jne 0x8b27
jmp 0x8b3f
movb $0x0, -0x1(%rax)
jmp 0x8b19
movl %r15d, 0xdda2(%rip)     # 0x168e8
movq 0xdd1b(%rip), %rdi      # 0x16868
callq 0x54b0
movl %eax, %ebx
jmp 0x8b67
movl %r15d, 0xdd8b(%rip)     # 0x168e8
testl %r15d, %r15d
jne 0x8b46
xorl %r15d, %r15d
xorl %ebx, %ebx
movzbl 0xdcda(%rip), %eax      # 0x16848
leal -0x5e(%rax), %ecx
cmpl $0x2, %ecx
jb 0x8db9
cmpl $0x50, %eax
je 0x8db9
cmpl $0x6b, %eax
je 0x8bc3
cmpl $0x5d, %eax
jne 0x8ddb
cmpl $0x4, %ebx
ja 0x8bdd
movl %ebx, %eax
leaq 0x47ad(%rip), %rcx      # 0xd34c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2, %r15d
jl 0x8db9
movq 0xdcb7(%rip), %rdi      # 0x16870
callq 0x9e0b
jmp 0x8c93
movq 0xdc9e(%rip), %rdi      # 0x16868
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9e0b
cmpl $0x34, %ebx
je 0x8cad
cmpl $0x68, %ebx
jne 0x8ddb
xorl %r14d, %r14d
cmpl $0x2, %r15d
jge 0x8c0e
pushq $-0x1
popq %rbp
jmp 0x8c1c
cmpl $0x3, %r15d
jl 0x8ddb
movq 0xdc6a(%rip), %r14      # 0x16878
movq 0xdc5b(%rip), %rdi      # 0x16870
callq 0x54b0
movl %eax, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x99ab
testl %eax, %eax
je 0x8dc8
cmpl $0x1, %r15d
jg 0x8c3d
cmpl $0x68, %ebx
je 0x8db9
movq 0xb3ac(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
testq %r14, %r14
leaq 0x4bb8(%rip), %rcx      # 0xd809
cmovneq %r14, %rcx
leaq 0x4b8b(%rip), %rsi      # 0xd7e7
movl %ebp, %edx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5850
cmpl $0x2, %r15d
jl 0x8db9
movq 0xdbec(%rip), %rdi      # 0x16870
jmp 0x8bca
cmpl $0x2, %r15d
jl 0x8db9
movq 0xdbd6(%rip), %rdi      # 0x16870
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9d97
cmpl $0x3, %r15d
jl 0x8db9
leaq 0xdeda(%rip), %rax      # 0x16b98
cmpl $0x0, (%rax)
je 0x8db9
movq 0xdbaa(%rip), %r15      # 0x16878
leaq 0x8(%rsp), %rax
movq %r15, (%rax)
movq %r15, %rdi
callq 0x5370
addq $0x3, %rax
shrq $0x2, %rax
leaq (%rax,%rax,2), %rdi
incq %rdi
callq 0x5a1c
movq %rax, %r13
leaq 0x2(%rax), %rbp
movq %rax, 0x10(%rsp)
cmpb $0x0, (%r15)
je 0x8ec8
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x8fb3
movzbl %al, %eax
leaq 0x4761(%rip), %rbx      # 0xd480
movb (%rax,%rbx), %r14b
movq %r12, %rdi
callq 0x8fb3
movzbl %al, %eax
movb (%rax,%rbx), %r15b
movq %r12, %rdi
callq 0x8fb3
movzbl %al, %eax
movb (%rax,%rbx), %bl
movq %r12, %rdi
callq 0x8fb3
cmpb $-0x1, %r14b
je 0x8ece
cmpb $-0x1, %r15b
je 0x8ece
movzbl %al, %eax
leaq 0x471a(%rip), %rcx      # 0xd480
movb (%rax,%rcx), %al
shlb $0x2, %r14b
movl %r15d, %ecx
shrb $0x4, %cl
andb $0x3, %cl
orb %r14b, %cl
movb %cl, -0x2(%rbp)
cmpb $-0x1, %bl
je 0x8ed3
shlb $0x4, %r15b
movl %ebx, %ecx
shrb $0x2, %cl
andb $0xf, %cl
orb %r15b, %cl
movb %cl, -0x1(%rbp)
cmpb $-0x1, %al
je 0x8ed6
shlb $0x6, %bl
orb %bl, %al
addq $0x3, %r13
movb %al, (%rbp)
movq 0x8(%rsp), %r15
addq $0x3, %rbp
jmp 0x8cfe
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7408
movq 0xb20e(%rip), %r12      # 0x13ff0
movq (%r12), %rcx
leaq 0x4a23(%rip), %rdi      # 0xd810
pushq $0x14
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x57f0
movq (%r12), %rdi
movsbl 0xda42(%rip), %edx      # 0x16848
leaq 0x4a18(%rip), %rsi      # 0xd825
xorl %eax, %eax
callq 0x5850
pushq $0x4
popq %r15
leaq 0x4a1b(%rip), %rbp      # 0xd83a
xorl %r13d, %r13d
cmpq 0xda37(%rip), %r13      # 0x16860
jae 0x8efc
movq 0xda1a(%rip), %rax      # 0x16850
movzbl (%rax,%r13), %r14d
testl %r14d, %r14d
je 0x8eae
callq 0x5390
movq (%rax), %rax
testb $0x40, 0x1(%rax,%r14,2)
movq (%r12), %rcx
je 0x8e64
movl %r14d, %edi
movq %rcx, %rsi
callq 0x54f0
incq %r13
jmp 0x8e22
cmpl $0x1b, %r14d
je 0x8e88
cmpl $0xd, %r14d
je 0x8e7f
cmpl $0xa, %r14d
jne 0x8e9c
leaq 0x49ae(%rip), %rdi      # 0xd82b
jmp 0x8e8f
leaq 0x49aa(%rip), %rdi      # 0xd830
jmp 0x8e8f
leaq 0x49a6(%rip), %rdi      # 0xd835
movq %r15, %rsi
movq %rbx, %rdx
callq 0x57f0
jmp 0x8e5f
movq %rcx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x5850
jmp 0x8e5f
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x54f0
addq $-0x2, %rbp
jmp 0x8ed6
movq %r13, %rbp
jmp 0x8ed6
decq %rbp
movb $0x0, (%rbp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8f0b
callq 0x96f3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9694
movq (%r12), %rcx
leaq 0x493a(%rip), %rdi      # 0xd841
pushq $0x5
jmp 0x8f1e
movq 0xb0de(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x48b3(%rip), %rdi      # 0xd7cf
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57f0