// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/restore.c
// Function: restore_node
node_t *restore_node(jsmntok_t **t, char *json)
{
	if ((*t)->type == JSMN_PRIMITIVE) {
		(*t)++;
		return NULL;
	} else {
		int s = (*t)->size;
		(*t)++;
		/* hack to prevent a new ID from being generated */
		node_t *n = make_node(UINT32_MAX);

		for (int i = 0; i < s; i++) {
			if (keyeq("id", *t, json)) {
				(*t)++;
				sscanf(json + (*t)->start, "%u", &n->id);
			RESTORE_ANY(splitType, &n->split_type, parse_split_type)
			RESTORE_DOUBLE(splitRatio, &n->split_ratio)
			RESTORE_BOOL(vacant, &n->vacant)
			RESTORE_BOOL(hidden, &n->hidden)
			RESTORE_BOOL(sticky, &n->sticky)
			RESTORE_BOOL(private, &n->private)
			RESTORE_BOOL(locked, &n->locked)
			RESTORE_BOOL(marked, &n->marked)
			} else if (keyeq("presel", *t, json)) {
				(*t)++;
				n->presel = restore_presel(t, json);
				continue;
			} else if (keyeq("rectangle", *t, json)) {
				(*t)++;
				restore_rectangle(&n->rectangle, t, json);
				continue;
			} else if (keyeq("constraints", *t, json)) {
				(*t)++;
				restore_constraints(&n->constraints, t, json);
				continue;
			} else if (keyeq("firstChild", *t, json)) {
				(*t)++;
				node_t *fc = restore_node(t, json);
				n->first_child = fc;
				if (fc != NULL) {
					fc->parent = n;
				}
				continue;
			} else if (keyeq("secondChild", *t, json)) {
				(*t)++;
				node_t *sc = restore_node(t, json);
				n->second_child = sc;
				if (sc != NULL) {
					sc->parent = n;
				}
				continue;
			} else if (keyeq("client", *t, json)) {
				(*t)++;
				n->client = restore_client(t, json);
				continue;
			} else {
				warn("Restore node: unknown key: '%.*s'.\n", (*t)->end - (*t)->start, json + (*t)->start);
				(*t)++;
			}
			(*t)++;
		}

		return n;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, (%rax)
jne 0x2829a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x2893f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xc700
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x28937
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x723d(%rip), %rdi      # 0x2f525
callq 0x27330
testb $0x1, %al
jne 0x282f3
jmp 0x2832a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rdx
leaq 0x648d(%rip), %rsi      # 0x2e7ab
movb $0x0, %al
callq 0x41c0
jmp 0x2891b
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x7299(%rip), %rdi      # 0x2f5d5
callq 0x27330
testb $0x1, %al
jne 0x28347
jmp 0x283a6
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
callq 0x20940
movq -0x38(%rbp), %rdi
callq 0x4450
jmp 0x28919
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x7227(%rip), %rdi      # 0x2f5df
callq 0x27330
testb $0x1, %al
jne 0x283c3
jmp 0x283fe
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rdx
addq $0x8, %rdx
leaq 0x5bdb(%rip), %rsi      # 0x2dfcd
movb $0x0, %al
callq 0x41c0
jmp 0x28917
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x71da(%rip), %rdi      # 0x2f5ea
callq 0x27330
testb $0x1, %al
jne 0x2841b
jmp 0x2847a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x24, %rsi
callq 0x208b0
movq -0x40(%rbp), %rdi
callq 0x4450
jmp 0x28915
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6a0e(%rip), %rdi      # 0x2ee9a
callq 0x27330
testb $0x1, %al
jne 0x28497
jmp 0x284f6
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x25, %rsi
callq 0x208b0
movq -0x48(%rbp), %rdi
callq 0x4450
jmp 0x28913
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x699a(%rip), %rdi      # 0x2eea2
callq 0x27330
testb $0x1, %al
jne 0x28513
jmp 0x28572
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x26, %rsi
callq 0x208b0
movq -0x50(%rbp), %rdi
callq 0x4450
jmp 0x28911
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6926(%rip), %rdi      # 0x2eeaa
callq 0x27330
testb $0x1, %al
jne 0x2858f
jmp 0x285ee
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x27, %rsi
callq 0x208b0
movq -0x58(%rbp), %rdi
callq 0x4450
jmp 0x2890f
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x68b3(%rip), %rdi      # 0x2eeb3
callq 0x27330
testb $0x1, %al
jne 0x2860b
jmp 0x2866a
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
callq 0x208b0
movq -0x60(%rbp), %rdi
callq 0x4450
jmp 0x2890d
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x683f(%rip), %rdi      # 0x2eebb
callq 0x27330
testb $0x1, %al
jne 0x28687
jmp 0x286e6
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
movslq %eax, %rsi
callq 0x6750
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x29, %rsi
callq 0x208b0
movq -0x68(%rbp), %rdi
callq 0x4450
jmp 0x2890b
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x65ef(%rip), %rdi      # 0x2ece7
callq 0x27330
testb $0x1, %al
jne 0x28703
jmp 0x2872e
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28950
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x5bbc(%rip), %rdi      # 0x2e2fc
callq 0x27330
testb $0x1, %al
jne 0x2874b
jmp 0x28773
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x27c60
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6e6c(%rip), %rdi      # 0x2f5f1
callq 0x27330
testb $0x1, %al
jne 0x28790
jmp 0x287b8
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x28ac0
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6e33(%rip), %rdi      # 0x2f5fd
callq 0x27330
testb $0x1, %al
jne 0x287d5
jmp 0x28818
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28260
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
cmpq $0x0, -0x70(%rbp)
je 0x28813
movq -0x28(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6dde(%rip), %rdi      # 0x2f608
callq 0x27330
testb $0x1, %al
jne 0x28835
jmp 0x28878
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28260
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
cmpq $0x0, -0x78(%rbp)
je 0x28873
movq -0x28(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6d8a(%rip), %rdi      # 0x2f614
callq 0x27330
testb $0x1, %al
jne 0x28895
jmp 0x288bd
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28bd0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0x28929
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %esi
movq -0x10(%rbp), %rax
movq (%rax), %rax
subl 0x4(%rax), %esi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rdx
leaq 0x6d31(%rip), %rdi      # 0x2f61b
movb $0x0, %al
callq 0x6410
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
jmp 0x28901
jmp 0x28903
jmp 0x28905
jmp 0x28907
jmp 0x28909
jmp 0x2890b
jmp 0x2890d
jmp 0x2890f
jmp 0x28911
jmp 0x28913
jmp 0x28915
jmp 0x28917
jmp 0x28919
jmp 0x2891b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x282ca
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)