// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq $0x0, -0x8(%rbp)
movl 0x132f2(%rip), %eax     # 0x1dc68
andl $-0x15, %eax
movl %eax, 0x132e9(%rip)     # 0x1dc68
callq 0xabd0
movl 0x15596(%rip), %eax     # 0x1ff20
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
je 0xa9a3
movq 0x15507(%rip), %rdi     # 0x1fea0
callq 0x5460
movl %eax, -0x24(%rbp)
jmp 0xa9aa
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0xa9aa
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
movsbl 0x152e1(%rip), %eax     # 0x1fc98
addl $-0x50, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x1b, %eax
ja 0xab01
movq -0x30(%rbp), %rax
leaq 0x7b60(%rip), %rcx      # 0x12534
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x3, %eax
jb 0xaa0b
jmp 0xa9ea
movl -0x34(%rbp), %eax
subl $0x4, %eax
je 0xaa6e
jmp 0xa9f4
movl -0x34(%rbp), %eax
subl $0x34, %eax
je 0xaa22
jmp 0xa9fe
movl -0x34(%rbp), %eax
subl $0x68, %eax
je 0xaa81
jmp 0xaade
cmpl $0x1, -0x10(%rbp)
jle 0xaa1d
movq 0x15490(%rip), %rdi     # 0x1fea8
callq 0xcac0
jmp 0xab1e
cmpl $0x2, -0x10(%rbp)
jle 0xaa69
movq 0x15481(%rip), %rdi     # 0x1feb0
callq 0xaca0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xaa4f
movq -0x20(%rbp), %rdi
callq 0xc270
callq 0xc1e0
jmp 0xaa67
movq 0xc59a(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7ff5(%rip), %rsi      # 0x12a55
movb $0x0, %al
callq 0x57e0
jmp 0xaa69
jmp 0xab1e
cmpl $0x3, -0x10(%rbp)
jge 0xaa76
jmp 0xaade
movq 0x15433(%rip), %rax     # 0x1feb0
movq %rax, -0x8(%rbp)
cmpl $0x1, -0x10(%rbp)
jle 0xaa98
movq 0x1541a(%rip), %rdi     # 0x1fea8
callq 0x5460
movl %eax, -0x38(%rbp)
jmp 0xaaa2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x38(%rbp)
jmp 0xaaa2
movl -0x38(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0xc630
cmpl $0x0, %eax
je 0xaad7
movq 0xc530(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x7f9f(%rip), %rsi      # 0x12a6d
movb $0x0, %al
callq 0x57e0
jmp 0xaadc
callq 0x8800
jmp 0xab1e
jmp 0xab01
movq 0x153b9(%rip), %rdi     # 0x1fea0
callq 0xcac0
jmp 0xab1e
movl 0x13170(%rip), %eax     # 0x1dc64
orl $0x80, %eax
movl %eax, 0x13165(%rip)     # 0x1dc64
jmp 0xab1e
movq 0xc4e8(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7f75(%rip), %rsi      # 0x12a87
movb $0x0, %al
callq 0x57e0
callq 0xae10
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)