// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/group.c
// Function: group_update_names
void
group_update_names(struct screen_ctx *sc)
{
	char		**strings, *p;
	unsigned char	*prop_ret;
	int		 i = 0, j = 0, nstrings = 0, n = 0, setnames = 0;

	if ((j = xu_getprop(sc->rootwin, ewmh[_NET_DESKTOP_NAMES].atom,
	    cwmh[UTF8_STRING].atom, 0xffffff, (u_char **)&prop_ret)) > 0) {
		prop_ret[j - 1] = '\0'; /* paranoia */
		while (i < j) {
			if (prop_ret[i++] == '\0')
				nstrings++;
		}
	}

	strings = xmalloc((nstrings < CALMWM_NGROUPS ? CALMWM_NGROUPS :
	    nstrings) * sizeof(*strings));

	p = (char *)prop_ret;
	while (n < nstrings) {
		strings[n++] = xstrdup(p);
		p += strlen(p) + 1;
	}
	/*
	 * make sure we always set our defaults if nothing is there to
	 * replace them.
	 */
	if (n < CALMWM_NGROUPS) {
		setnames = 1;
		i = 1;
		while (n < CALMWM_NGROUPS)
			strings[n++] = xstrdup(shortcut_to_name[i++]);
	}

	if (prop_ret != NULL)
		XFree(prop_ret);
	if (sc->group_nonames != 0)
		xfree(sc->group_names);

	sc->group_names = strings;
	sc->group_nonames = n;
	if (setnames)
		group_set_names(sc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r13
movq 0x18(%rdi), %rdi
leaq 0xa0bd(%rip), %rax      # 0x14500
movq 0xa8(%rax), %rsi
leaq 0xa04f(%rip), %rax      # 0x144a0
movq 0x58(%rax), %rdx
leaq 0x8(%rsp), %r8
movl $0xffffff, %ecx         # imm = 0xFFFFFF
callq 0x8c6f
xorl %r12d, %r12d
movl $0x0, %ebp
testl %eax, %eax
jle 0xa498
movq 0x8(%rsp), %rcx
movl %eax, %eax
movb $0x0, -0x1(%rcx,%rax)
movq 0x8(%rsp), %rcx
xorl %edx, %edx
xorl %ebp, %ebp
cmpb $0x1, (%rcx,%rdx)
leaq 0x1(%rdx), %rsi
adcl $0x0, %ebp
movq %rsi, %rdx
cmpq %rsi, %rax
jne 0xa485
cmpl $0xa, %ebp
movl $0x9, %edi
cmovgel %ebp, %edi
shlq $0x3, %rdi
callq 0x6188
movq %rax, %r14
testl %ebp, %ebp
jle 0xa4df
movq 0x8(%rsp), %r15
movl %ebp, %ebx
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x61cd
movq %rax, (%r14,%r12,8)
incq %r12
movq %r15, %rdi
callq 0x5330
addq %rax, %r15
incq %r15
cmpq %r12, %rbx
jne 0xa4bd
movl %r12d, %ebx
cmpl $0x8, %r12d
ja 0xa532
movq %r13, 0x10(%rsp)
movl %r12d, %eax
movl $0xa, %ebx
subl %r12d, %ebx
decq %rbx
movq %rax, 0x18(%rsp)
leaq (%r14,%rax,8), %rbp
xorl %r13d, %r13d
leaq 0xa1f2(%rip), %r15      # 0x14700
movq 0x8(%r15,%r13,8), %rdi
callq 0x61cd
movq %rax, (%rbp,%r13,8)
incq %r13
cmpq %r13, %rbx
jne 0xa50e
movq 0x18(%rsp), %rbx
addl %r13d, %ebx
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa541
callq 0x5060
cmpl $0x0, 0x2dc(%r13)
je 0xa557
movq 0x2e8(%r13), %rdi
callq 0x61c8
movq %r14, 0x2e8(%r13)
movl %ebx, 0x2dc(%r13)
cmpl $0x8, %r12d
ja 0xa61d
testl %ebx, %ebx
jle 0xa594
movl %ebx, %ebx
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%r14,%r12,8), %rdi
callq 0x5330
addq %rax, %r15
incq %r15
incq %r12
cmpq %r12, %rbx
jne 0xa57b
jmp 0xa597
xorl %r15d, %r15d
movl $0x1, %esi
movq %r15, %rdi
callq 0x61a8
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x2dc(%r13)
movq %r13, %rdi
jle 0xa610
xorl %ebx, %ebx
movq 0x20(%rsp), %r12
movq %r15, %r13
movq %rdi, 0x10(%rsp)
movq 0x2e8(%rdi), %rax
movq (%rax,%rbx,8), %rbp
movq %rbp, %rdi
callq 0x5330
movq %rax, %r14
incq %rax
movq %rax, 0x18(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xd500
movq 0x10(%rsp), %rdi
subq 0x18(%rsp), %r13
addq %r14, %r12
incq %r12
incq %rbx
movslq 0x2dc(%rdi), %rax
cmpq %rax, %rbx
jl 0xa5c5
movq 0x20(%rsp), %rsi
movl %r15d, %edx
callq 0x92cb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq