// File: /workspace/github_c_makefile_star2_O2/mrdotx[P]st/st.c
// Function: set_notifmode
void set_notifmode(int type, KeySym ksym) {
	static char *lib[] = { " MOVE ", " SEL  "};
	static Glyph *g, *deb, *fin;
	static int col, bot;

	if ( ksym == -1 ) {
		free(g);
		col = term.col, bot = term.bot;
		g = xmalloc(col * sizeof(Glyph));
		memcpy(g, term.line[bot], col * sizeof(Glyph));

	}
	else if ( ksym == -2 )
		memcpy(term.line[bot], g, col * sizeof(Glyph));

	if ( type < 2 ) {
		char *z = lib[type];
		for (deb = &term.line[bot][col - 6], fin = &term.line[bot][col]; deb < fin; z++, deb++)
			deb->mode = ATTR_REVERSE,
				deb->u = *z,
				deb->fg = defaultfg, deb->bg = defaultbg;
	}
	else if ( type < 5 )
		memcpy(term.line[bot], g, col * sizeof(Glyph));
	else {
		for (deb = &term.line[bot][0], fin = &term.line[bot][col]; deb < fin; deb++)
			deb->mode = ATTR_REVERSE,
				deb->u = ' ',
				deb->fg = defaultfg, deb->bg = defaultbg;
		term.line[bot][0].u = ksym;
	}

	term.dirty[bot] = 1;
	drawregion(0, bot, col, bot + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
cmpq $-0x2, %rsi
je 0x9296
cmpq $-0x1, %r14
jne 0x92c2
movq 0x132e7(%rip), %rdi     # 0x1c538
callq 0x6360
movslq 0x102af(%rip), %rdi     # 0x1950c
movl %edi, 0x132ed(%rip)     # 0x1c550
movl 0x1128f(%rip), %eax     # 0x1a4f8
movl %eax, 0x132e5(%rip)     # 0x1c554
shlq $0x4, %rdi
callq 0x6b30
movq %rax, %rdi
movq %rax, 0x132b6(%rip)     # 0x1c538
movslq 0x132cb(%rip), %rax     # 0x1c554
shlq $0x3, %rax
addq 0x1027c(%rip), %rax     # 0x19510
jmp 0x92af
movq 0x10273(%rip), %rax     # 0x19510
movslq 0x132b0(%rip), %rcx     # 0x1c554
movq (%rax,%rcx,8), %rdi
leaq 0x13289(%rip), %rax     # 0x1c538
movq (%rax), %rsi
movslq 0x13297(%rip), %rdx     # 0x1c550
shlq $0x4, %rdx
callq 0x6920
cmpl $0x1, %ebp
jg 0x9359
movslq %ebp, %rax
leaq 0x818f(%rip), %rcx      # 0x11464
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq 0x1022d(%rip), %rcx     # 0x19510
movl 0x1326b(%rip), %ebx     # 0x1c554
movslq %ebx, %r12
movq (%rcx,%r12,8), %rdx
movslq 0x13259(%rip), %r15     # 0x1c550
movq %r15, %rsi
shlq $0x4, %rsi
leaq (%rdx,%rsi), %rcx
addq %rsi, %rdx
addq $-0x60, %rdx
movq %rdx, 0x13230(%rip)     # 0x1c540
movq %rcx, 0x13231(%rip)     # 0x1c548
leaq 0xf272(%rip), %rsi      # 0x18590
leaq 0xf26f(%rip), %rdi      # 0x18594
cmpq %rcx, %rdx
jae 0x93ed
movw $0x20, 0x4(%rdx)
movsbl (%rax), %r8d
movl %r8d, (%rdx)
movl (%rsi), %r8d
movl %r8d, 0x8(%rdx)
movl (%rdi), %r8d
movl %r8d, 0xc(%rdx)
incq %rax
addq $0x10, %rdx
movq %rdx, 0x131e9(%rip)     # 0x1c540
jmp 0x9325
movq 0x101b0(%rip), %rax     # 0x19510
movl 0x131ee(%rip), %ebx     # 0x1c554
movslq %ebx, %r12
movq (%rax,%r12,8), %rdi
cmpl $0x4, %ebp
ja 0x938e
movq 0x131bf(%rip), %rsi     # 0x1c538
movslq 0x131d0(%rip), %r15     # 0x1c550
movq %r15, %rdx
shlq $0x4, %rdx
callq 0x6920
jmp 0x93ed
movq %rdi, 0x131ab(%rip)     # 0x1c540
movslq 0x131b4(%rip), %r15     # 0x1c550
movq %r15, %rax
shlq $0x4, %rax
addq %rdi, %rax
movq %rax, 0x1319b(%rip)     # 0x1c548
leaq 0xf1dc(%rip), %rcx      # 0x18590
leaq 0xf1d9(%rip), %rdx      # 0x18594
movq %rdi, %rsi
cmpq %rax, %rsi
jae 0x93ea
movw $0x20, 0x4(%rsi)
movl $0x20, (%rsi)
movl (%rcx), %r8d
movl %r8d, 0x8(%rsi)
movl (%rdx), %r8d
movl %r8d, 0xc(%rsi)
addq $0x10, %rsi
movq %rsi, 0x13158(%rip)     # 0x1c540
jmp 0x93be
movl %r14d, (%rdi)
movq 0x110d4(%rip), %rax     # 0x1a4c8
movl $0x1, (%rax,%r12,4)
leal 0x1(%rbx), %edx
movl %ebx, %edi
movl %r15d, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8ebb