// File: /workspace/github_c_makefile_star2_O0/tudurom[P]windowchef/wm.c
// Function: update_window_status
static void update_window_status(struct client *client)
{
	/* it really shouldn't happen */
	if (client == NULL)
		return;
	int size = 0;
	char *str = NULL;
	char *state;
	if (client->maxed) state = "maxed";
	else if (client->hmaxed) state = "hmaxed";
	else if (client->vmaxed) state = "vmaxed";
	else if (client->monocled) state = "monocled";
	else if (client->gridded) state = "gridded";
	else state = "normal";
	/* this is going to be fun */
#define _BOOL_VALUE(value) ((value) ? "true" : "false")
	size = asprintf(&str,
	"{"
		"\"window\":\"0x%08x\","
		"\"geom\":{"
			"\"x\":%d,"
			"\"y\":%d,"
			"\"width\":%d,"
			"\"height\":%d,"
			"\"set_by_user\":%s"
		"},"
		"\"state\":\"%s\","
		"\"min_width\":%d,"
		"\"min_height\":%d,"
		"\"max_width\":%d,"
		"\"max_height\":%d,"
		"\"width_inc\":%d,"
		"\"height_inc\":%d,"
		"\"mapped\":%s,"
		"\"group\":%d"
	"}", client->window, client->geom.x, client->geom.y, client->geom.width,
	client->geom.height, _BOOL_VALUE(client->geom.set_by_user), state,
	client->min_width, client->min_height, client->max_width, client->max_height,
	client->width_inc, client->height_inc, _BOOL_VALUE(client->mapped), client->group);
#undef _BOOL_VALUE
	if (size == -1) {
		DMSG("asprintf returned -1\n");
		return;
	}
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, client->window,
			ATOMS[WINDOWCHEF_STATUS], XCB_ATOM_STRING, 8, size, str);
	free(str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5b94
jmp 0x5d76
movl $0x0, -0x34(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rax
testb $0x1, 0x24(%rax)
je 0x5bba
leaq 0x6667(%rip), %rax      # 0xc21b
movq %rax, -0x48(%rbp)
jmp 0x5c29
movq -0x30(%rbp), %rax
testb $0x1, 0x25(%rax)
je 0x5bd1
leaq 0x664f(%rip), %rax      # 0xc21a
movq %rax, -0x48(%rbp)
jmp 0x5c27
movq -0x30(%rbp), %rax
testb $0x1, 0x26(%rax)
je 0x5be8
leaq 0x663f(%rip), %rax      # 0xc221
movq %rax, -0x48(%rbp)
jmp 0x5c25
movq -0x30(%rbp), %rax
testb $0x1, 0x27(%rax)
je 0x5bff
leaq 0x662f(%rip), %rax      # 0xc228
movq %rax, -0x48(%rbp)
jmp 0x5c23
movq -0x30(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x5c16
leaq 0x6621(%rip), %rax      # 0xc231
movq %rax, -0x48(%rbp)
jmp 0x5c21
leaq 0x661c(%rip), %rax      # 0xc239
movq %rax, -0x48(%rbp)
jmp 0x5c23
jmp 0x5c25
jmp 0x5c27
jmp 0x5c29
movq -0x30(%rbp), %rax
movl (%rax), %edx
movq -0x30(%rbp), %rax
movswl 0x4(%rax), %ecx
movq -0x30(%rbp), %rax
movswl 0x6(%rax), %r8d
movq -0x30(%rbp), %rax
movzwl 0x8(%rax), %r9d
movq -0x30(%rbp), %rax
movzwl 0xa(%rax), %eax
movq -0x30(%rbp), %rsi
movb 0xc(%rsi), %r10b
leaq 0x66b9(%rip), %rsi      # 0xc319
leaq 0x66ad(%rip), %rdi      # 0xc314
testb $0x1, %r10b
cmovneq %rdi, %rsi
movq %rsi, -0x60(%rbp)
movq -0x48(%rbp), %rsi
movq %rsi, -0x58(%rbp)
movq -0x30(%rbp), %rsi
movzwl 0x48(%rsi), %r13d
movq -0x30(%rbp), %rsi
movzwl 0x4a(%rsi), %r12d
movq -0x30(%rbp), %rsi
movzwl 0x4c(%rsi), %r15d
movq -0x30(%rbp), %rsi
movzwl 0x4e(%rsi), %r14d
movq -0x30(%rbp), %rsi
movzwl 0x50(%rsi), %ebx
movq -0x30(%rbp), %rsi
movzwl 0x52(%rsi), %r11d
movq -0x30(%rbp), %rsi
movb 0x54(%rsi), %dil
leaq 0x665a(%rip), %r10      # 0xc319
leaq 0x664e(%rip), %rsi      # 0xc314
testb $0x1, %dil
cmovneq %rsi, %r10
movq -0x30(%rbp), %rsi
movl 0x58(%rsi), %esi
movl %esi, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x655d(%rip), %rsi      # 0xc240
movl %eax, (%rsp)
movq -0x60(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x58(%rbp), %rax
movq %rax, 0x10(%rsp)
movl -0x50(%rbp), %eax
movl %r13d, 0x18(%rsp)
movl %r12d, 0x20(%rsp)
movl %r15d, 0x28(%rsp)
movl %r14d, 0x30(%rsp)
movl %ebx, 0x38(%rsp)
movl %r11d, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movb $0x0, %al
callq 0xb540
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
jne 0x5d33
jmp 0x5d76
movq 0x969e(%rip), %rdi      # 0xf3d8
movq -0x30(%rbp), %rax
movl (%rax), %edx
movl 0x9ad6(%rip), %ecx      # 0xf81c
movl -0x34(%rbp), %r10d
movq -0x40(%rbp), %rax
xorl %esi, %esi
movl $0x1f, %r8d
movl $0x8, %r9d
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x35b0
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rdi
callq 0x32d0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)