// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/rule.c
// Function: parse_key_value
void parse_key_value(char *key, char *value, rule_consequence_t *csq)
{
	bool v;
	if (streq("monitor", key)) {
		snprintf(csq->monitor_desc, sizeof(csq->monitor_desc), "%s", value);
	} else if (streq("desktop", key)) {
		snprintf(csq->desktop_desc, sizeof(csq->desktop_desc), "%s", value);
	} else if (streq("node", key)) {
		snprintf(csq->node_desc, sizeof(csq->node_desc), "%s", value);
	} else if (streq("split_dir", key)) {
		direction_t dir;
		if (parse_direction(value, &dir)) {
			SET_CSQ_SPLIT_DIR(dir);
		}
	} else if (streq("state", key)) {
		client_state_t cst;
		if (parse_client_state(value, &cst)) {
			SET_CSQ_STATE(cst);
		}
	} else if (streq("layer", key)) {
		stack_layer_t lyr;
		if (parse_stack_layer(value, &lyr)) {
			SET_CSQ_LAYER(lyr);
		}
	} else if (streq("split_ratio", key)) {
		double rat;
		if (sscanf(value, "%lf", &rat) == 1 && rat > 0 && rat < 1) {
			csq->split_ratio = rat;
		}
	} else if (streq("rectangle", key)) {
		if (csq->rect == NULL) {
			csq->rect = calloc(1, sizeof(xcb_rectangle_t));
		}
		if (!parse_rectangle(value, csq->rect)) {
			free(csq->rect);
			csq->rect = NULL;
		}
	} else if (streq("honor_size_hints", key)) {
		if (!parse_honor_size_hints_mode(value, &csq->honor_size_hints)) {
			csq->honor_size_hints = HONOR_SIZE_HINTS_DEFAULT;
		}
	} else if (parse_bool(value, &v)) {
		if (streq("hidden", key)) {
			csq->hidden = v;
		}
#define SETCSQ(name) \
		else if (streq(#name, key)) { \
			csq->name = v; \
		}
		SETCSQ(sticky)
		SETCSQ(private)
		SETCSQ(locked)
		SETCSQ(marked)
		SETCSQ(center)
		SETCSQ(follow)
		SETCSQ(manage)
		SETCSQ(focus)
		SETCSQ(border)
#undef SETCSQ
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2c43(%rip), %rdi      # 0x2021c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d7ab
leaq 0x2c3f(%rip), %rdi      # 0x2022f
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d7b4
leaq 0x2c3b(%rip), %rdi      # 0x20242
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d7bd
leaq 0x3fa5(%rip), %rdi      # 0x215c3
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d7e6
leaq 0x2767(%rip), %rdi      # 0x1fd9c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d828
leaq 0x2723(%rip), %rdi      # 0x1fd6f
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d866
leaq 0x30aa(%rip), %rdi      # 0x2070d
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d8ae
leaq 0x2af2(%rip), %rdi      # 0x2016c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d8f1
leaq 0x2faf(%rip), %rdi      # 0x20640
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d940
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x169bc
testb %al, %al
je 0x1d8a4
leaq 0x364b(%rip), %rdi      # 0x20d08
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d965
leaq 0x363c(%rip), %rdi      # 0x20d10
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d974
leaq 0x362d(%rip), %rdi      # 0x20d18
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d983
leaq 0x361f(%rip), %rdi      # 0x20d21
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d992
leaq 0x3610(%rip), %rdi      # 0x20d29
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d9a1
leaq 0x3e9d(%rip), %rdi      # 0x215cd
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d9b0
leaq 0x25de(%rip), %rdi      # 0x1fd25
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d9bf
leaq 0x3e76(%rip), %rdi      # 0x215d4
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d9ce
leaq 0x2560(%rip), %rdi      # 0x1fcd5
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1d9dd
leaq 0x3e4f(%rip), %rdi      # 0x215db
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x62d(%rbx)
jmp 0x1d8a4
addq $0x300, %rbx            # imm = 0x300
jmp 0x1d7c4
addq $0x400, %rbx            # imm = 0x400
jmp 0x1d7c4
addq $0x500, %rbx            # imm = 0x500
leaq 0x187c(%rip), %rdx      # 0x1f047
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x4110
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x16be3
testb %al, %al
je 0x1d8a4
cmpq $0x0, 0x600(%rbx)
jne 0x1d81b
movl $0x1, %edi
movl $0x4, %esi
callq 0x48b0
movq %rax, 0x600(%rbx)
movl 0x8(%rsp), %eax
movq 0x600(%rbx), %rcx
jmp 0x1d8a2
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x16b03
testb %al, %al
je 0x1d8a4
cmpq $0x0, 0x618(%rbx)
jne 0x1d859
movl $0x1, %edi
movl $0x4, %esi
callq 0x48b0
movq %rax, 0x618(%rbx)
movl 0x8(%rsp), %eax
movq 0x618(%rbx), %rcx
jmp 0x1d8a2
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x16b80
testb %al, %al
je 0x1d8a4
cmpq $0x0, 0x610(%rbx)
jne 0x1d897
movl $0x1, %edi
movl $0x4, %esi
callq 0x48b0
movq %rax, 0x610(%rbx)
movl 0x8(%rsp), %eax
movq 0x610(%rbx), %rcx
movl %eax, (%rcx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2588(%rip), %rsi      # 0x1fe3d
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x41c0
cmpl $0x1, %eax
jne 0x1d8a4
movsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1d8a4
movsd 0x1d37(%rip), %xmm1     # 0x1f618
ucomisd %xmm0, %xmm1
jbe 0x1d8a4
movsd %xmm0, 0x608(%rbx)
jmp 0x1d8a4
cmpq $0x0, 0x630(%rbx)
jne 0x1d911
movl $0x1, %edi
movl $0x8, %esi
callq 0x48b0
movq %rax, 0x630(%rbx)
movq 0x630(%rbx), %rsi
movq %r15, %rdi
callq 0x1740e
testb %al, %al
jne 0x1d8a4
movq 0x630(%rbx), %rdi
callq 0x4460
movq $0x0, 0x630(%rbx)
jmp 0x1d8a4
addq $0x620, %rbx            # imm = 0x620
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1711b
testb %al, %al
jne 0x1d8a4
movl $0x4, (%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x624(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x625(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x626(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x627(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x628(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x629(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x62a(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x62b(%rbx)
jmp 0x1d8a4
movb 0x8(%rsp), %al
movb %al, 0x62c(%rbx)
jmp 0x1d8a4