// File: /workspace/github_c_makefile_star2_O2/seanpringle[P]xoat/./spot.c
// Function: spot_update_bar
void spot_update_bar(int spot, int mon)
{
	int i, n = 0, len = 0; Client *o, *c = NULL;
	char *name = NULL, title[SPOT_BUFF]; *title = 0;
	Monitor *m = &monitors[mon];

	if (spot == SPOT1)
	{
		// Show X root window name in spot1 bar
		// Use xsetroot -name for a custom status
		char *tmp = NULL;
		if (XFetchName(display, root, &tmp))
			len += snprintf(title+len, MAX(0, SPOT_BUFF-len), " %s  ", tmp);
		if (tmp) XFree(tmp);
	}
	for_windows(i, o) if (o->manage && o->spot == spot && o->monitor == mon)
	{
		if (!c) c = o;
		if ((name = window_get_name(o->window)) && name)
		{
			if (settings.title_ellipsis > 0 && strlen(name) > settings.title_ellipsis)
			{
				name = realloc(name, strlen(name)+4);
				strcpy(name+settings.title_ellipsis, "...");
			}
			len += snprintf(title+len, MAX(0, SPOT_BUFF-len), " [%d] %s  ", n++, name);
			free(name);
		}
	}
	if (settings.title)
	{
		if (c && !c->full && *title && m->bars[spot])
		{
			int focus = c->window == current || (spot == current_spot && mon == current_mon);
			char *color  = focus && c->window == current ? settings.title_focus : settings.title_blur;
			char *border = focus && c->window == current ? settings.border_focus: settings.border_blur;
			textbox_font(m->bars[spot], settings.title, color, border);
			textbox_text(m->bars[spot], title);
			textbox_draw(m->bars[spot]);
			textbox_show(m->bars[spot]);
		}
		else
		if (m->bars[spot])
			textbox_hide(m->bars[spot]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movl %esi, %ebp
movl %edi, %r14d
movb $0x0, 0x30(%rsp)
movslq %esi, %rax
imulq $0x48, %rax, %rbx
leaq 0x7f8b(%rip), %r15      # 0xebc0
movl $0x0, %r12d
cmpl $0x1, %edi
jne 0x6c94
leaq 0x18(%rsp), %rdx
andq $0x0, (%rdx)
movq 0x7f60(%rip), %rdi      # 0xebb0
movq 0x8551(%rip), %rsi      # 0xf1a8
callq 0x3510
testl %eax, %eax
je 0x6c82
movq 0x18(%rsp), %rcx
leaq 0x3760(%rip), %rdx      # 0xa3cc
leaq 0x30(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
callq 0x3080
movl %eax, %r12d
jmp 0x6c85
xorl %r12d, %r12d
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6c94
callq 0x3050
movl %r12d, 0x8(%rsp)
addq %rbx, %r15
movq %r15, 0x20(%rsp)
callq 0x5607
movslq %r14d, %r14
leaq 0x80f0(%rip), %rbx      # 0xeda0
xorl %r15d, %r15d
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
movl %ebp, 0xc(%rsp)
movswq 0x80d5(%rip), %rax      # 0xeda0
cmpq %rax, %r15
jge 0x6dc3
movq 0x8(%rbx,%r15,8), %rax
testq %rax, %rax
je 0x6dbb
cmpw $0x0, 0x104(%rax)
je 0x6dbb
cmpq %r14, 0x118(%rax)
jne 0x6dbb
movswl 0x100(%rax), %ecx
cmpl %ebp, %ecx
jne 0x6dbb
testq %r13, %r13
cmoveq %rax, %r13
movq (%rax), %rdi
callq 0x551f
testq %rax, %rax
je 0x6dbb
movq %rax, %r12
movl 0x84d3(%rip), %ebp      # 0xf200
testq %rbp, %rbp
movq %r13, 0x28(%rsp)
je 0x6d64
movq %r12, %rdi
callq 0x3250
cmpq %rbp, %rax
jbe 0x6d64
addq $0x4, %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x3640
movq %rax, %r12
movl 0x84a4(%rip), %eax      # 0xf200
movl $0x2e2e2e, (%r12,%rax)  # imm = 0x2E2E2E
movslq 0x8(%rsp), %rbp
leaq (%rsp,%rbp), %rdi
addq $0x30, %rdi
movl $0x400, %esi            # imm = 0x400
subl %ebp, %esi
testl %esi, %esi
movl $0x0, %eax
cmovlel %eax, %esi
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %r13d
leaq 0x3635(%rip), %rdx      # 0xa3c7
movq %r12, %r8
xorl %eax, %eax
callq 0x3080
addl %ebp, %eax
movl %eax, 0x8(%rsp)
movq %r12, %rdi
callq 0x3220
movl %r13d, %eax
movq %rax, 0x10(%rsp)
movl 0xc(%rsp), %ebp
movq 0x28(%rsp), %r13
incq %r15
jmp 0x6cc3
movq 0x841e(%rip), %rsi      # 0xf1e8
testq %rsi, %rsi
je 0x6e67
testq %r13, %r13
movq 0x20(%rsp), %rbx
je 0x6e58
cmpw $0x0, 0x10a(%r13)
jne 0x6e58
cmpb $0x0, 0x30(%rsp)
je 0x6e58
movq 0x28(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x6e58
movq (%r13), %rax
cmpq 0x7db4(%rip), %rax      # 0xebb8
leaq 0x83ed(%rip), %rax      # 0xf1f8
leaq 0x83de(%rip), %rcx      # 0xf1f0
cmoveq %rax, %rcx
movq (%rcx), %rdx
leaq 0x83b0(%rip), %rax      # 0xf1d0
leaq 0x83a1(%rip), %rcx      # 0xf1c8
cmoveq %rax, %rcx
movq (%rcx), %rcx
callq 0x3bc6
movq 0x28(%rbx,%r14,8), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3c74
movq 0x28(%rbx,%r14,8), %rdi
callq 0x3e83
movq 0x28(%rbx,%r14,8), %rdi
callq 0x3e01
jmp 0x6e67
movq 0x28(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x6e67
callq 0x3e14
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq