// File: /workspace/github_c_makefile_star2_O1/gitluin[P]sara/src/sara.c
// Function: outputstats
void
outputstats(){
	char* isdeskocc, * isdesksel, monstate[NUMTAGS+3];
	int i;
	unsigned int occ, sel;

	/* output:
	 * "0:SONNNNNNN:Y"
	 * im->num:SEL/OCC/EMPTY:curlayout->symbol
	 */
	for EACHMON(mhead){
		occ = sel = 0;
		isdeskocc = ecalloc(NUMTAGS, sizeof(char));
		isdesksel = ecalloc(NUMTAGS, sizeof(char));
		sel = im->seldesks;

		for EACHCLIENT(im->head)
			occ |= ic->desks;

		/* uis get reordered in the dest string so they are left-to-right */
		uitos(occ, NUMTAGS, isdeskocc);
		uitos(sel, NUMTAGS, isdesksel);

		for (i=0;i<NUMTAGS;i++){
			if (isdesksel[i] == '1'){
				monstate[i] = 'S';
			} else if (isdeskocc[i] == '1'){
				monstate[i] = 'O';
			} else {
				monstate[i] = 'N';
			}
		}
		monstate[NUMTAGS] = ':';
		monstate[NUMTAGS+1] = im->curlayout->letter;
		monstate[NUMTAGS+2] = '\0';

		setrootstats(monstate, im->num);

		free(isdeskocc);
		free(isdesksel);
	}

	fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x4b63(%rip), %rax      # 0x95c0
movq %rax, 0x4a74(%rip)      # 0x94d8
testq %rax, %rax
je 0x4c15
xorl %r14d, %r14d
movl $0x9, %edi
movl $0x1, %esi
callq 0x23a0
movq %rax, %r15
testq %rax, %rax
jne 0x4a95
leaq 0x15a2(%rip), %rdi      # 0x6030
xorl %eax, %eax
callq 0x5440
movl $0x9, %edi
movl $0x1, %esi
callq 0x23a0
movq %rax, %r12
testq %rax, %rax
jne 0x4aba
leaq 0x157d(%rip), %rdi      # 0x6030
xorl %eax, %eax
callq 0x5440
movq 0x4a17(%rip), %rax      # 0x94d8
movl 0x24(%rax), %ebp
movq 0x30(%rax), %rax
xorl %edi, %edi
testq %rax, %rax
je 0x4ad8
orl 0x1c(%rax), %edi
movq 0x28(%rax), %rax
jmp 0x4aca
movq %rax, 0x49f1(%rip)      # 0x94d0
movl $0x9, %esi
movq %r15, %rdx
callq 0x26a2
movl %ebp, %edi
movl $0x9, %esi
movq %r12, %rdx
callq 0x26a2
xorl %eax, %eax
cmpb $0x31, (%r12,%rax)
jne 0x4b0b
movb $0x53, 0xc(%rsp,%rax)
jmp 0x4b1e
cmpb $0x31, (%r15,%rax)
jne 0x4b19
movb $0x4f, 0xc(%rsp,%rax)
jmp 0x4b1e
movb $0x4e, 0xc(%rsp,%rax)
incq %rax
cmpq $0x9, %rax
jne 0x4afd
movb $0x3a, 0x15(%rsp)
movq 0x49a5(%rip), %rax      # 0x94d8
movq 0x40(%rax), %rcx
movb (%rcx), %cl
movb %cl, 0x16(%rsp)
movb %r14b, 0x17(%rsp)
movl 0x20(%rax), %ebp
movl $0x28, %edi
callq 0x2130
movq %rax, %r13
movl $0xc, %edi
callq 0x2130
movq %rax, %rbx
movb %r14b, (%r13)
movq %rax, %rdi
leaq 0x14d2(%rip), %rsi      # 0x603f
movl %ebp, %edx
xorl %eax, %eax
callq 0x2220
movq %r13, %rdi
callq 0x21b0
movabsq $0x4e4f4d5f41524153, %rcx # imm = 0x4E4F4D5F41524153
movq %rcx, (%r13,%rax)
movabsq $0x5f45544154534e, %rcx # imm = 0x5F45544154534E
movq %rcx, 0x7(%r13,%rax)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2290
movq 0x4912(%rip), %rbx      # 0x94c0
movq 0x49fb(%rip), %rbp      # 0x95b0
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x23c0
movl $0x1f, %ecx
movq %rbx, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq $0xc
leaq 0x14(%rsp), %rax
pushq %rax
callq 0x2400
addq $0x10, %rsp
movq %r15, %rdi
callq 0x21a0
movq %r12, %rdi
callq 0x21a0
movq 0x48d7(%rip), %rax      # 0x94d8
movq 0x48(%rax), %rax
movq %rax, 0x48cc(%rip)      # 0x94d8
testq %rax, %rax
jne 0x4a70
movq 0x43dc(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
callq 0x24e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq