// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
andb $-0x15, 0xf75a(%rip)    # 0x18638
andl $0x0, 0x11a0b(%rip)     # 0x1a8f0
leaq 0x1177c(%rip), %r12     # 0x1a668
movslq 0x11979(%rip), %rax     # 0x1a86c
movb $0x0, 0x1(%rax,%r12)
cmpb $0x0, 0x11769(%rip)     # 0x1a669
je 0x8f3e
leaq 0x11760(%rip), %rax     # 0x1a669
movslq 0x119e0(%rip), %r14     # 0x1a8f0
cmpq $0xf, %r14
jg 0x8f4b
leal 0x1(%r14), %ecx
movl %ecx, 0x119d0(%rip)     # 0x1a8f0
movq %rax, 0x208(%r12,%r14,8)
incq %rax
movzbl -0x1(%rax), %edx
testl %edx, %edx
je 0x8f44
cmpl $0x3b, %edx
jne 0x8f28
movb $0x0, -0x1(%rax)
jmp 0x8f09
movl 0x119ac(%rip), %ecx     # 0x1a8f0
movl %ecx, %r14d
testl %ecx, %ecx
je 0x8f59
movq 0x1191e(%rip), %rdi     # 0x1a870
callq 0x5460
jmp 0x8f5e
xorl %r14d, %r14d
xorl %eax, %eax
movzbl 0x11703(%rip), %ecx     # 0x1a668
leal -0x5e(%rcx), %edx
cmpl $0x2, %edx
jb 0x8fb7
cmpl $0x50, %ecx
je 0x8fb0
cmpl $0x6b, %ecx
je 0x8fc6
cmpl $0x5d, %ecx
jne 0x9106
cmpl $0x3, %eax
jb 0x8fe0
cmpl $0x4, %eax
je 0x90c8
cmpl $0x34, %eax
je 0x8fef
cmpl $0x68, %eax
jne 0x9106
xorl %ebx, %ebx
cmpl $0x2, %r14d
jge 0x90d5
pushq $-0x1
popq %rdi
jmp 0x90e3
orb $-0x80, 0xf67d(%rip)    # 0x18634
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x118a3(%rip), %rdi     # 0x1a870
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa062
cmpl $0x2, %r14d
jl 0x8fb7
movq 0x1188b(%rip), %rdi     # 0x1a878
jmp 0x8fcd
cmpl $0x3, %r14d
jl 0x8fb7
movq 0x11884(%rip), %r15     # 0x1a880
leaq 0x10(%rsp), %r14
movq %r15, (%r14)
movq %r15, %rdi
callq 0x5320
addq $0x3, %rax
shrq $0x2, %rax
leaq (%rax,%rax,2), %rdi
incq %rdi
callq 0x599c
movq %rax, 0x8(%rsp)
leaq 0x2(%rax), %r12
leaq 0x4420(%rip), %r13      # 0xd450
cmpb $0x0, (%r15)
je 0x91ec
movq %r14, %rdi
callq 0x92d8
movzbl %al, %eax
movb (%rax,%r13), %bl
movq %r14, %rdi
callq 0x92d8
movzbl %al, %eax
movb (%rax,%r13), %bpl
movq %r14, %rdi
callq 0x92d8
movzbl %al, %eax
movb (%rax,%r13), %r15b
movq %r14, %rdi
callq 0x92d8
movzbl %al, %eax
movb (%rax,%r13), %al
shlb $0x2, %bl
movl %ebp, %ecx
shrb $0x4, %cl
andb $0x3, %cl
orb %bl, %cl
movb %cl, -0x2(%r12)
cmpb $-0x1, %r15b
je 0x91f2
shlb $0x4, %bpl
movl %r15d, %ecx
shrb $0x2, %cl
andb $0xf, %cl
orb %bpl, %cl
movb %cl, -0x1(%r12)
cmpb $-0x1, %al
je 0x91f5
shlb $0x6, %r15b
orb %r15b, %al
movb %al, (%r12)
movq 0x10(%rsp), %r15
addq $0x3, %r12
jmp 0x9030
cmpl $0x3, %r14d
jl 0x9106
movq 0x117ab(%rip), %rbx     # 0x1a880
movq 0x1179c(%rip), %rdi     # 0x1a878
callq 0x5460
movl %eax, %edi
movq %rbx, %rsi
callq 0x9d0f
testl %eax, %eax
jne 0x921c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x76c7
movq 0xaee3(%rip), %r13      # 0x13ff0
movq (%r13), %rcx
leaq 0x46b9(%rip), %rdi      # 0xd7d1
pushq $0x14
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x5770
movq (%r13), %rdi
movsbl 0x11537(%rip), %edx     # 0x1a668
leaq 0x46ae(%rip), %rsi      # 0xd7e6
xorl %eax, %eax
callq 0x57d0
pushq $0x4
popq %r15
xorl %ebp, %ebp
movslq 0x11720(%rip), %rax     # 0x1a86c
cmpq %rax, %rbp
jge 0x9245
movzbl 0x1(%rbp,%r12), %r14d
testl %r14d, %r14d
je 0x91d2
callq 0x5340
movq (%rax), %rax
testb $0x40, 0x1(%rax,%r14,2)
movq (%r13), %rcx
je 0x9184
movl %r14d, %edi
movq %rcx, %rsi
callq 0x54a0
incq %rbp
jmp 0x9145
cmpl $0x1b, %r14d
je 0x91a8
cmpl $0xd, %r14d
je 0x919f
cmpl $0xa, %r14d
jne 0x91bc
leaq 0x464f(%rip), %rdi      # 0xd7ec
jmp 0x91af
leaq 0x464b(%rip), %rdi      # 0xd7f1
jmp 0x91af
leaq 0x4647(%rip), %rdi      # 0xd7f6
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5770
jmp 0x917f
movq %rcx, %rdi
leaq 0x4635(%rip), %rsi      # 0xd7fb
movl %r14d, %edx
xorl %eax, %eax
callq 0x57d0
jmp 0x917f
movq (%r13), %rsi
pushq $0xa
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x54a0
addq $-0x2, %r12
jmp 0x91f5
decq %r12
movb $0x0, (%r12)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9254
callq 0x9a57
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x99f8
movq 0xadcd(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x458a(%rip), %rsi      # 0xd7b7
movq %rbx, %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57d0
movq (%r13), %rcx
leaq 0x45b2(%rip), %rdi      # 0xd802
pushq $0x5
jmp 0x9267
movq 0xad95(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x453a(%rip), %rdi      # 0xd79f
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5770