// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/client.c
// Function: client_setname
void
client_setname(struct client_ctx *cc)
{
	struct winname	*wn;
	char		*newname;

	if (!xu_getstrprop(cc->win, ewmh[_NET_WM_NAME].atom, &newname))
		if (!xu_getstrprop(cc->win, XA_WM_NAME, &newname))
			newname = emptystring;

	TAILQ_FOREACH(wn, &cc->nameq, entry)
		if (strcmp(wn->name, newname) == 0) {
			/* Move to the last since we got a hit. */
			TAILQ_REMOVE(&cc->nameq, wn, entry);
			TAILQ_INSERT_TAIL(&cc->nameq, wn, entry);
			goto match;
		}

	wn = xmalloc(sizeof(*wn));
	wn->name = newname;
	TAILQ_INSERT_TAIL(&cc->nameq, wn, entry);
	cc->nameqlen++;

match:
	cc->name = wn->name;

	/* Now, do some garbage collection. */
	if (cc->nameqlen > CLIENT_MAXNAMEQLEN) {
		wn = TAILQ_FIRST(&cc->nameq);
		assert(wn != NULL);
		TAILQ_REMOVE(&cc->nameq, wn, entry);
		if (wn->name != emptystring)
			xfree(wn->name);
		xfree(wn);
		cc->nameqlen--;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0x12985(%rip), %rax     # 0x19500
movq 0xc8(%rax), %rsi
leaq -0x18(%rbp), %rdx
callq 0xb030
cmpl $0x0, %eax
jne 0x6bb8
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movl $0x27, %esi
leaq -0x18(%rbp), %rdx
callq 0xb030
cmpl $0x0, %eax
jne 0x6bb6
leaq 0x15c36(%rip), %rax     # 0x1c7e8
movq %rax, -0x18(%rbp)
jmp 0x6bb8
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6c87
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5610
cmpl $0x0, %eax
jne 0x6c75
jmp 0x6bee
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6c0d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x6c20
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0x6c34
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc8(%rax)
jmp 0x6cf3
jmp 0x6c77
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x6bc7
movl $0x18, %edi
callq 0x6420
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xd0(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x5, 0xd0(%rax)
jle 0x6dce
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6d2f
jmp 0x6d4e
leaq 0xd378(%rip), %rdi      # 0x140ae
leaq 0xd37c(%rip), %rsi      # 0x140b9
movl $0x245, %edx            # imm = 0x245
leaq 0xd379(%rip), %rcx      # 0x140c2
callq 0x5190
jmp 0x6d50
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6d6f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x6d82
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x15a49(%rip), %rcx     # 0x1c7e8
cmpq %rcx, 0x10(%rax)
je 0x6db2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x64b0
movq -0x10(%rbp), %rdi
callq 0x64b0
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xd0(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)