// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/messages.c
// Function: get_setting
void get_setting(coordinates_t loc, char *name, FILE* rsp)
{
	if (streq("split_ratio", name)) {
		fprintf(rsp, "%lf", split_ratio);
	} else if (streq("border_width", name)) {
		if (loc.node != NULL) {
			for (node_t *n = first_extrema(loc.node); n != NULL; n = next_leaf(n, loc.node)) {
				if (n->client != NULL) {
					fprintf(rsp, "%u", n->client->border_width);
					break;
				}
			}
		} else if (loc.desktop != NULL) {
			fprintf(rsp, "%u", loc.desktop->border_width);
		} else if (loc.monitor != NULL) {
			fprintf(rsp, "%u", loc.monitor->border_width);
		} else {
			fprintf(rsp, "%u", border_width);
		}
	} else if (streq("window_gap", name)) {
		if (loc.desktop != NULL) {
			fprintf(rsp, "%i", loc.desktop->window_gap);
		} else if (loc.monitor != NULL) {
			fprintf(rsp, "%i", loc.monitor->window_gap);
		} else {
			fprintf(rsp, "%i", window_gap);
		}
#define GET_DEF_MON_DESK(k) \
		if (loc.desktop != NULL) { \
			fprintf(rsp, "%i", loc.desktop->k); \
		} else if (loc.monitor != NULL) { \
			fprintf(rsp, "%i", loc.monitor->k); \
		} else { \
			fprintf(rsp, "%i", k); \
		}
	} else if (streq("top_padding", name)) {
		GET_DEF_MON_DESK(padding.top)
	} else if (streq("right_padding", name)) {
		GET_DEF_MON_DESK(padding.right)
	} else if (streq("bottom_padding", name)) {
		GET_DEF_MON_DESK(padding.bottom)
	} else if (streq("left_padding", name)) {
		GET_DEF_MON_DESK(padding.left)
#undef GET_DEF_MON_DESK
	} else if (streq("top_monocle_padding", name)) {
		fprintf(rsp, "%i", monocle_padding.top);
	} else if (streq("right_monocle_padding", name)) {
		fprintf(rsp, "%i", monocle_padding.right);
	} else if (streq("bottom_monocle_padding", name)) {
		fprintf(rsp, "%i", monocle_padding.bottom);
	} else if (streq("left_monocle_padding", name)) {
		fprintf(rsp, "%i", monocle_padding.left);
	} else if (streq("external_rules_command", name)) {
		fprintf(rsp, "%s", external_rules_command);
	} else if (streq("status_prefix", name)) {
		fprintf(rsp, "%s", status_prefix);
	} else if (streq("initial_polarity", name)) {
		fprintf(rsp, "%s", CHILD_POL_STR(initial_polarity));
	} else if (streq("automatic_scheme", name)) {
		fprintf(rsp, "%s", AUTO_SCM_STR(automatic_scheme));
	} else if (streq("honor_size_hints", name)) {
		fprintf(rsp, "%s", HSH_MODE_STR(honor_size_hints));
	} else if (streq("mapping_events_count", name)) {
		fprintf(rsp, "%" PRIi8, mapping_events_count);
	} else if (streq("directional_focus_tightness", name)) {
		fprintf(rsp, "%s", TIGHTNESS_STR(directional_focus_tightness));
	} else if (streq("ignore_ewmh_fullscreen", name)) {
		print_ignore_request(ignore_ewmh_fullscreen, rsp);
	} else if (streq("pointer_modifier", name)) {
		print_modifier_mask(pointer_modifier, rsp);
	} else if (streq("click_to_focus", name)) {
		print_button_index(click_to_focus, rsp);
	} else if (streq("pointer_motion_interval", name)) {
		fprintf(rsp, "%u", pointer_motion_interval);
	} else if (streq("pointer_action1", name) ||
	           streq("pointer_action2", name) ||
	           streq("pointer_action3", name)) {
		int index = name[14] - '1';
		print_pointer_action(pointer_actions[index], rsp);
#define GET_COLOR(s) \
	} else if (streq(#s, name)) { \
		fprintf(rsp, "%s", s);
	GET_COLOR(normal_border_color)
	GET_COLOR(active_border_color)
	GET_COLOR(focused_border_color)
	GET_COLOR(presel_feedback_color)
#undef GET_COLOR
#define GET_BOOL(s) \
	} else if (streq(#s, name)) { \
		fprintf(rsp, "%s", BOOL_STR(s));
	GET_BOOL(presel_feedback)
	GET_BOOL(borderless_monocle)
	GET_BOOL(gapless_monocle)
	GET_BOOL(single_monocle)
	GET_BOOL(borderless_singleton)
	GET_BOOL(swallow_first_click)
	GET_BOOL(focus_follows_pointer)
	GET_BOOL(pointer_follows_focus)
	GET_BOOL(pointer_follows_monitor)
	GET_BOOL(ignore_ewmh_focus)
	GET_BOOL(ignore_ewmh_struts)
	GET_BOOL(center_pseudo_tiled)
	GET_BOOL(removal_adjustment)
	GET_BOOL(remove_disabled_monitors)
	GET_BOOL(remove_unplugged_monitors)
	GET_BOOL(merge_overlapping_monitors)
#undef GET_BOOL
	} else {
		fail(rsp, "config: Unknown setting: '%s'.\n", name);
		return;
	}
	fprintf(rsp, "\n");
}

void handle_failure(int code, char *src, char *val, FILE *rsp)
{
	switch (code) {
		case SELECTOR_BAD_DESCRIPTOR:
			fail(rsp, "%s: Invalid descriptor found in '%s'.\n", src, val);
			break;
		case SELECTOR_BAD_MODIFIERS:
			fail(rsp, "%s: Invalid modifier found in '%s'.\n", src, val);
			break;
		case SELECTOR_INVALID:
			fail(rsp, "");
			break;
	}
}

void fail(FILE *rsp, char *fmt, ...)
{
	fprintf(rsp, FAILURE_MESSAGE);
	va_list ap;
	va_start(ap, fmt);
	vfprintf(rsp, fmt, ap);
	va_end(ap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa774(%rip), %rdi      # 0x1f6c1
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1536f
leaq 0x20(%rsp), %r15
leaq 0xa659(%rip), %rdi      # 0x1f5c2
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15390
leaq 0xa685(%rip), %rdi      # 0x1f605
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x153c0
leaq 0xa679(%rip), %rdi      # 0x1f610
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x153d1
leaq 0xa66e(%rip), %rdi      # 0x1f61c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x153fe
leaq 0xa665(%rip), %rdi      # 0x1f62a
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1541f
leaq 0xa65d(%rip), %rdi      # 0x1f639
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1544d
leaq 0xa653(%rip), %rdi      # 0x1f646
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15477
leaq 0xa650(%rip), %rdi      # 0x1f65a
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x154aa
leaq 0xa64f(%rip), %rdi      # 0x1f670
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x154cc
leaq 0xa64f(%rip), %rdi      # 0x1f687
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x154e1
leaq 0xa64d(%rip), %rdi      # 0x1f69c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15515
leaq 0xa64d(%rip), %rdi      # 0x1f6b3
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1551e
leaq 0xa6a3(%rip), %rdi      # 0x1f720
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15527
leaq 0xa69d(%rip), %rdi      # 0x1f731
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15545
leaq 0xa549(%rip), %rdi      # 0x1f5f4
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1557a
leaq 0xa680(%rip), %rdi      # 0x1f742
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15596
leaq 0xa683(%rip), %rdi      # 0x1f75c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x155a5
leaq 0xa688(%rip), %rdi      # 0x1f778
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x155dd
leaq 0xa688(%rip), %rdi      # 0x1f78f
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x155f3
leaq 0xa6ca(%rip), %rdi      # 0x1f7e8
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1560a
leaq 0xa66b(%rip), %rdi      # 0x1f7a0
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15641
leaq 0xa66c(%rip), %rdi      # 0x1f7b8
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15621
leaq 0xa665(%rip), %rdi      # 0x1f7c8
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15621
leaq 0xa65e(%rip), %rdi      # 0x1f7d8
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15621
leaq 0xa53c(%rip), %rdi      # 0x1f6cd
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1564d
leaq 0xa539(%rip), %rdi      # 0x1f6e1
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15659
leaq 0xa536(%rip), %rdi      # 0x1f6f5
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15665
leaq 0xa534(%rip), %rdi      # 0x1f70a
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15671
leaq 0x99ef(%rip), %rdi      # 0x1ebdc
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1567d
leaq 0xa618(%rip), %rdi      # 0x1f81c
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15689
leaq 0xa614(%rip), %rdi      # 0x1f82f
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15692
leaq 0xa5c5(%rip), %rdi      # 0x1f7f7
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1569b
leaq 0xa5f6(%rip), %rdi      # 0x1f83f
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156a4
leaq 0xa5f4(%rip), %rdi      # 0x1f854
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156ad
leaq 0xa58f(%rip), %rdi      # 0x1f806
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156b6
leaq 0xa5da(%rip), %rdi      # 0x1f868
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156bf
leaq 0xa5d9(%rip), %rdi      # 0x1f87e
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156c8
leaq 0xa5da(%rip), %rdi      # 0x1f896
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156d1
leaq 0xa5d5(%rip), %rdi      # 0x1f8a8
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156da
leaq 0xa5d1(%rip), %rdi      # 0x1f8bb
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156e3
leaq 0xa5ce(%rip), %rdi      # 0x1f8cf
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156ec
leaq 0xa5ca(%rip), %rdi      # 0x1f8e2
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156f5
leaq 0xa5cc(%rip), %rdi      # 0x1f8fb
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x156fe
leaq 0xa5cf(%rip), %rdi      # 0x1f915
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x15707
leaq 0xa5d3(%rip), %rsi      # 0x1f930
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10897
leaq 0x13a52(%rip), %rax     # 0x28dc8
movsd (%rax), %xmm0
leaq 0x9aa0(%rip), %rsi      # 0x1ee21
movq %rbx, %rdi
movb $0x1, %al
callq 0x4a30
jmp 0x15505
movq 0x10(%r15), %r14
testq %r14, %r14
je 0x153e2
movq %r14, %rdi
callq 0x8e72
testq %rax, %rax
je 0x15505
movq 0x48(%rax), %rcx
testq %rcx, %rcx
jne 0x153f3
movq %rax, %rdi
movq %r14, %rsi
callq 0x8ed0
jmp 0x153a1
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1540f
movl 0x60(%rax), %edx
jmp 0x154f4
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x15430
movl 0x50(%rax), %edx
jmp 0x154f4
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x15440
movl 0x64(%rax), %edx
jmp 0x154a1
movl 0x300(%rcx), %edx
jmp 0x154a1
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1545e
movl 0x54(%rax), %edx
jmp 0x154f4
movq (%r15), %rax
testq %rax, %rax
je 0x1546e
movl 0x44(%rax), %edx
jmp 0x154f4
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x15480
movl 0x58(%rax), %edx
jmp 0x154f4
movq (%r15), %rax
testq %rax, %rax
je 0x1548d
movl 0x30(%rax), %edx
jmp 0x154f4
movq (%r15), %rax
testq %rax, %rax
je 0x15498
movl 0x48(%rax), %edx
jmp 0x154a1
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x154b3
movl 0x5c(%rax), %edx
jmp 0x154f4
movq (%r15), %rax
testq %rax, %rax
je 0x154c0
movl 0x34(%rax), %edx
jmp 0x154f4
leaq 0x1394b(%rip), %rax     # 0x28dc0
jmp 0x15494
leaq 0x13932(%rip), %rax     # 0x28db0
jmp 0x15494
movq (%r15), %rax
testq %rax, %rax
je 0x154d5
movl 0x38(%rax), %edx
jmp 0x154f4
leaq 0x1390c(%rip), %rax     # 0x28da0
movl (%rax), %edx
jmp 0x154f4
leaq 0x13925(%rip), %rax     # 0x28dc4
movl (%rax), %edx
leaq 0xa127(%rip), %rsi      # 0x1f5cf
jmp 0x154fb
leaq 0x138ff(%rip), %rax     # 0x28db0
jmp 0x154c7
movq (%r15), %rax
testq %rax, %rax
je 0x154ea
movl 0x3c(%rax), %edx
jmp 0x154f4
leaq 0x138d9(%rip), %rax     # 0x28da0
movl 0x4(%rax), %edx
jmp 0x154f4
leaq 0x138dd(%rip), %rax     # 0x28db0
jmp 0x154dc
leaq 0x138c4(%rip), %rax     # 0x28da0
movl 0x8(%rax), %edx
jmp 0x154f4
leaq 0x138c8(%rip), %rax     # 0x28db0
jmp 0x154f1
leaq 0x138af(%rip), %rax     # 0x28da0
movl 0xc(%rax), %edx
leaq 0xac24(%rip), %rsi      # 0x2011f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
pushq $0xa
popq %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4420
leaq 0x13284(%rip), %rdi     # 0x287a0
jmp 0x15570
leaq 0x1337b(%rip), %rdi     # 0x288a0
jmp 0x15570
leaq 0x138a2(%rip), %rax     # 0x28dd0
cmpl $0x0, (%rax)
leaq 0xa418(%rip), %rax      # 0x1f950
leaq 0xa41d(%rip), %rdi      # 0x1f95c
cmoveq %rax, %rdi
jmp 0x15570
leaq 0x13888(%rip), %rax     # 0x28dd4
movl (%rax), %eax
cmpl $0x1, %eax
leaq 0xa41e(%rip), %rcx      # 0x1f976
leaq 0xa421(%rip), %rdx      # 0x1f980
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0xa3fd(%rip), %rdi      # 0x1f969
cmovneq %rdx, %rdi
movq %rbx, %rsi
callq 0x4670
jmp 0x15505
leaq 0x13887(%rip), %rax     # 0x28e08
movl (%rax), %eax
cmpl $0x2, %eax
je 0x155bf
cmpl $0x3, %eax
jne 0x155c8
leaq 0xa6c1(%rip), %rdi      # 0x1fc55
jmp 0x15570
leaq 0x13857(%rip), %rax     # 0x28df4
movsbl (%rax), %edx
jmp 0x154f4
leaq 0x13830(%rip), %rax     # 0x28ddc
cmpl $0x1, (%rax)
leaq 0xa3dc(%rip), %rax      # 0x1f992
leaq 0xa752(%rip), %rdi      # 0x1fd0f
jmp 0x1553f
leaq 0xa6e0(%rip), %rdi      # 0x1fca6
jmp 0x15570
testl %eax, %eax
leaq 0xa3bb(%rip), %rax      # 0x1f98c
leaq 0xa3af(%rip), %rdi      # 0x1f987
jmp 0x1553f
leaq 0x1381c(%rip), %rax     # 0x28e00
movl (%rax), %edi
movq %rbx, %rsi
callq 0x18480
jmp 0x15505
leaq 0x137e6(%rip), %rax     # 0x28de0
movzwl (%rax), %edi
movq %rbx, %rsi
callq 0x184fc
jmp 0x15505
leaq 0x137ec(%rip), %rax     # 0x28dfd
movsbl (%rax), %edi
movq %rbx, %rsi
callq 0x18584
jmp 0x15505
movsbq 0xe(%r14), %rax
leaq 0x137bb(%rip), %rcx     # 0x28de8
movl -0xc4(%rcx,%rax,4), %edi
movq %rbx, %rsi
callq 0x185d9
jmp 0x15505
leaq 0x1379c(%rip), %rax     # 0x28de4
jmp 0x1549f
leaq 0x1334c(%rip), %rdi     # 0x289a0
jmp 0x15570
leaq 0x13440(%rip), %rdi     # 0x28aa0
jmp 0x15570
leaq 0x13534(%rip), %rdi     # 0x28ba0
jmp 0x15570
leaq 0x13628(%rip), %rdi     # 0x28ca0
jmp 0x15570
leaq 0x13771(%rip), %rax     # 0x28df5
jmp 0x1570e
leaq 0x13766(%rip), %rax     # 0x28df6
jmp 0x1570e
leaq 0x1375e(%rip), %rax     # 0x28df7
jmp 0x1570e
leaq 0x13756(%rip), %rax     # 0x28df8
jmp 0x1570e
leaq 0x1374e(%rip), %rax     # 0x28df9
jmp 0x1570e
leaq 0x1374a(%rip), %rax     # 0x28dfe
jmp 0x1570e
leaq 0x1373d(%rip), %rax     # 0x28dfa
jmp 0x1570e
leaq 0x13735(%rip), %rax     # 0x28dfb
jmp 0x1570e
leaq 0x1372d(%rip), %rax     # 0x28dfc
jmp 0x1570e
leaq 0x13727(%rip), %rax     # 0x28dff
jmp 0x1570e
leaq 0x13723(%rip), %rax     # 0x28e04
jmp 0x1570e
leaq 0x1371b(%rip), %rax     # 0x28e05
jmp 0x1570e
leaq 0x136e5(%rip), %rax     # 0x28dd8
jmp 0x1570e
leaq 0x13710(%rip), %rax     # 0x28e0c
jmp 0x1570e
leaq 0x13708(%rip), %rax     # 0x28e0d
jmp 0x1570e
leaq 0x13700(%rip), %rax     # 0x28e0e
leaq 0xa272(%rip), %rcx      # 0x1f987
leaq 0xa270(%rip), %rdi      # 0x1f98c
cmpb $0x0, (%rax)
cmovneq %rcx, %rdi
jmp 0x15570