// File: /workspace/github_c_makefile_star2_O1/emmett1[P]st/st.c
// Function: strhandle
void
strhandle(void)
{
	char *p = NULL;
	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) {
				char *dec;

				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)) {
				fprintf(stderr, "erresc: invalid color %s\n", p);
			} 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 */
		term.mode |= ESC_DCS;
	case '_': /* APC -- Application Program Command */
	case '^': /* PM -- Privacy Message */
		return;
	}

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
andb $-0x15, 0x1015b(%rip)   # 0x19648
movl $0x0, 0x12409(%rip)     # 0x1b900
leaq 0x1217a(%rip), %rax     # 0x1b678
movslq 0x12377(%rip), %rcx     # 0x1b87c
movb $0x0, 0x1(%rcx,%rax)
cmpb $0x0, 0x12168(%rip)     # 0x1b679
setne %cl
movl 0x123e6(%rip), %edx     # 0x1b900
cmpl $0x10, %edx
setl %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x9564
leaq 0x12148(%rip), %rcx     # 0x1b679
leal 0x1(%rdx), %esi
movl %esi, 0x123c6(%rip)     # 0x1b900
movslq %edx, %rdx
movq %rcx, 0x208(%rax,%rdx,8)
incq %rcx
movzbl -0x1(%rcx), %edx
testl %edx, %edx
je 0x9564
cmpl $0x3b, %edx
jne 0x9545
movb $0x0, -0x1(%rcx)
movl 0x123a1(%rip), %edx     # 0x1b900
cmpl $0x10, %edx
jl 0x9531
movl 0x12396(%rip), %ebp     # 0x1b900
testl %ebp, %ebp
je 0x957c
movq 0x1230b(%rip), %rdi     # 0x1b880
callq 0x5460
jmp 0x957e
xorl %eax, %eax
movzbl 0x120f3(%rip), %ecx     # 0x1b678
cmpl $0x5d, %ecx
jle 0x95ad
leal -0x5e(%rcx), %eax
cmpl $0x2, %eax
jb 0x95db
cmpl $0x6b, %ecx
jne 0x9659
movq 0x122de(%rip), %rdi     # 0x1b880
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa875
cmpl $0x50, %ecx
je 0x95d4
cmpl $0x5d, %ecx
jne 0x9659
cmpl $0x3, %eax
jg 0x95e2
jae 0x9659
cmpl $0x2, %ebp
jl 0x95db
movq 0x122b6(%rip), %rdi     # 0x1b888
jmp 0x95a2
orb $-0x80, 0x10069(%rip)   # 0x19644
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x4, %eax
je 0x95f5
cmpl $0x34, %eax
je 0x9630
cmpl $0x68, %eax
jne 0x9659
xorl %ebx, %ebx
jmp 0x9601
cmpl $0x3, %ebp
jl 0x9659
movq 0x1228f(%rip), %rbx     # 0x1b890
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmpl $0x2, %ebp
jl 0x9619
movq 0x12276(%rip), %rdi     # 0x1b888
callq 0x5460
movl %eax, %edi
movq %rbx, %rsi
callq 0xa509
testl %eax, %eax
jne 0x9663
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7d2f
cmpl $0x3, %ebp
jl 0x95db
movq 0x12254(%rip), %rdi     # 0x1b890
callq 0x96f0
testq %rax, %rax
je 0x9684
movq %rax, %rdi
callq 0xa216
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa1b4
callq 0x5bb6
jmp 0x95db
movq 0xb986(%rip), %rax      # 0x14ff0
movq (%rax), %rdi
leaq 0x5145(%rip), %rsi      # 0xe7b9
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57e0
callq 0x5b9a
jmp 0x95db