// File: /workspace/github_c_makefile_star2_O1/gitluin[P]sara/src/sara.c
// Function: manage
void
manage(Window parent, XWindowAttributes* wa){
	client* c, * t;
	Window trans = None;

	c = ecalloc(1, sizeof(client));

	if (curmon->current && curmon->current->isfull)
		togglefs(dumbarg);

	c->win = parent;
	c->isfloat = c->oldfloat = c->isfull = c->iscur = 0;
	c->x = wa->x;
	c->y = wa->y;
	c->w = wa->width;
	c->h = wa->height;

	if (XGetTransientForHint(dis, parent, &trans) && (t = findclient(trans))){
		c->desks = t->desks;
		c->mon = t->mon;

	} else {
		c->mon = curmon;
		applyrules(c);
	}
	if (!c->isfloat)
		c->isfloat = c->oldfloat = (trans != None);

	adjustcoords(c);
	c->y = (c->y < c->mon->wy) ? c->mon->wy : c->y;

	configure(c);
	XSelectInput(dis, c->win, EnterWindowMask|FocusChangeMask|PropertyChangeMask
			|StructureNotifyMask);
	grabbuttons(c, 0);

	attach(c, 1);

	/* move out of the way until told otherwise */
	XMoveResizeWindow(dis, c->win, c->x + 2*sw, c->y, c->w, c->h);
	arrange(c->mon);
#ifdef _SHAPE_H_
	roundcorners(c);
#endif
	XMapWindow(dis, c->win);

	if (c->desks & c->mon->seldesks){
		changecurrent(c, c->mon, c->mon->curdesk, 0);
		restack(c->mon);

		/* applyrules */
		if (c->isfull){
			c->isfull = !c->isfull;
			togglefs(dumbarg);
		}
	}

	outputstats();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq $0x0, 0x8(%rsp)
movl $0x1, %edi
movl $0x40, %esi
callq 0x23a0
movq %rax, %rbx
testq %rax, %rax
jne 0x51df
leaq 0xe58(%rip), %rdi       # 0x6030
xorl %eax, %eax
callq 0x5440
movq 0x4302(%rip), %rax      # 0x94e8
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x51fa
cmpl $0x0, 0x18(%rax)
je 0x51fa
callq 0x31e1
movq %r14, 0x38(%rbx)
xorl %ebp, %ebp
movl %ebp, 0x20(%rbx)
movl %ebp, 0x18(%rbx)
movq $0x0, 0x10(%rbx)
movl (%r15), %eax
movl %eax, (%rbx)
movl 0x4(%r15), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%r15), %eax
movl %eax, 0x8(%rbx)
movl 0xc(%r15), %eax
movl %eax, 0xc(%rbx)
movq 0x4291(%rip), %rdi      # 0x94c0
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x2440
testl %eax, %eax
je 0x5262
movq 0x8(%rsp), %rdi
callq 0x4e5b
testq %rax, %rax
je 0x5262
movl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rbx)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rbx)
jmp 0x534e
movq 0x427f(%rip), %rax      # 0x94e8
movq %rax, 0x30(%rbx)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movl %ebp, 0x1c(%rbx)
movl %ebp, 0x10(%rbx)
movq 0x423a(%rip), %rdi      # 0x94c0
movq 0x38(%rbx), %rsi
leaq 0x20(%rsp), %r12
movq %r12, %rdx
callq 0x23b0
movq 0x4222(%rip), %rdi      # 0x94c0
movq 0x38(%rbx), %rsi
movq %r14, %rdx
callq 0x2210
movq 0x8(%r14), %r14
testq %r14, %r14
leaq 0xe6f(%rip), %r15       # 0x6127
cmovneq %r14, %r15
movq (%r12), %rsi
testq %rsi, %rsi
je 0x5321
leaq 0xe65(%rip), %rdi       # 0x6131
callq 0x2260
testq %rax, %rax
je 0x5321
leaq 0xe51(%rip), %rsi       # 0x612e
movq %r15, %rdi
callq 0x2260
testq %rax, %rax
je 0x5321
movl $0x1, %eax
movl %eax, 0x10(%rbx)
movl %eax, 0x18(%rbx)
movq 0x42c4(%rip), %rax      # 0x95c0
testq %rax, %rax
je 0x530d
cmpl $-0x1, 0x20(%rax)
je 0x5316
movq 0x48(%rax), %rax
jmp 0x52fc
movq %rax, 0x41c4(%rip)      # 0x94d8
jmp 0x5321
movq %rax, 0x41bb(%rip)      # 0x94d8
movq %rax, 0x30(%rbx)
testq %r14, %r14
je 0x532e
movq %r14, %rdi
callq 0x2040
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x533d
callq 0x2040
movl 0x1c(%rbx), %eax
testl %eax, %eax
jne 0x534b
movq 0x30(%rbx), %rax
movl 0x24(%rax), %eax
movl %eax, 0x1c(%rbx)
cmpl $0x0, 0x10(%rbx)
jne 0x5365
xorl %eax, %eax
cmpq $0x0, 0x8(%rsp)
setne %al
movl %eax, 0x14(%rbx)
movl %eax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x49d4
movl 0x4(%rbx), %eax
movq 0x30(%rbx), %rcx
movl 0x18(%rcx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x4(%rbx)
movq %rbx, %rdi
callq 0x5096
movq 0x4132(%rip), %rdi      # 0x94c0
movq 0x38(%rbx), %rsi
movl $0x620010, %edx         # imm = 0x620010
callq 0x2300
movq %rbx, %rdi
xorl %esi, %esi
callq 0x429d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x498a
movq 0x4106(%rip), %rdi      # 0x94c0
movl 0x420c(%rip), %edx      # 0x95cc
addl %edx, %edx
addl (%rbx), %edx
movq 0x38(%rbx), %rsi
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
callq 0x2250
movq 0x30(%rbx), %rdi
callq 0x3d4c
movq %rbx, %rdi
callq 0x3f12
movq 0x40d0(%rip), %rdi      # 0x94c0
movq 0x38(%rbx), %rsi
callq 0x22d0
movq 0x30(%rbx), %rsi
movl 0x24(%rsi), %eax
testl %eax, 0x1c(%rbx)
je 0x542d
movl 0x4(%rsi), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x4162
movq 0x30(%rbx), %rdi
callq 0x3ded
cmpl $0x0, 0x18(%rbx)
je 0x542d
movl $0x0, 0x18(%rbx)
callq 0x31e1
callq 0x4a48
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop