// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/restore.c
// Function: restore_client
client_t *restore_client(jsmntok_t **t, char *json)
{
	if ((*t)->type == JSMN_PRIMITIVE) {
		(*t)++;
		return NULL;
	} else {
		int s = (*t)->size;
		(*t)++;
		client_t *c = make_client();

		for (int i = 0; i < s; i++) {
			if (keyeq("className", *t, json)) {
				(*t)++;
				snprintf(c->class_name, (*t)->end - (*t)->start + 1, "%s", json + (*t)->start);
			} else if (keyeq("instanceName", *t, json)) {
				(*t)++;
				snprintf(c->instance_name, (*t)->end - (*t)->start + 1, "%s", json + (*t)->start);
			RESTORE_ANY(state, &c->state, parse_client_state)
			RESTORE_ANY(lastState, &c->last_state, parse_client_state)
			RESTORE_ANY(layer, &c->layer, parse_stack_layer)
			RESTORE_ANY(lastLayer, &c->last_layer, parse_stack_layer)
			RESTORE_UINT(borderWidth, &c->border_width)
			RESTORE_BOOL(urgent, &c->urgent)
			RESTORE_BOOL(shown, &c->shown)
			} else if (keyeq("tiledRectangle", *t, json)) {
				(*t)++;
				restore_rectangle(&c->tiled_rectangle, t, json);
				continue;
			} else if (keyeq("floatingRectangle", *t, json)) {
				(*t)++;
				restore_rectangle(&c->floating_rectangle, t, json);
				continue;
			} else {
				warn("Restore client: unknown key: '%.*s'.\n", (*t)->end - (*t)->start, json + (*t)->start);
				(*t)++;
			}

			(*t)++;
		}

		return c;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, (%rax)
jne 0x28c07
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x2917d
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)
callq 0xdef0
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x29175
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x69f8(%rip), %rdi      # 0x2f648
callq 0x27330
testb $0x1, %al
jne 0x28c5b
jmp 0x28cac
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rcx
leaq 0x4450(%rip), %rdx      # 0x2d0f0
movb $0x0, %al
callq 0x4120
jmp 0x29159
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x6994(%rip), %rdi      # 0x2f652
callq 0x27330
testb $0x1, %al
jne 0x28cc9
jmp 0x28d21
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x4(%rcx), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rax
addq %rax, %rcx
leaq 0x43db(%rip), %rdx      # 0x2d0f0
movb $0x0, %al
callq 0x4120
jmp 0x29157
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x51f9(%rip), %rdi      # 0x2df2c
callq 0x27330
testb $0x1, %al
jne 0x28d3e
jmp 0x28da0
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 $0x308, %rsi            # imm = 0x308
callq 0x20a90
movq -0x38(%rbp), %rdi
callq 0x4450
jmp 0x29155
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x68ad(%rip), %rdi      # 0x2f65f
callq 0x27330
testb $0x1, %al
jne 0x28dbd
jmp 0x28e1f
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 $0x30c, %rsi            # imm = 0x30C
callq 0x20a90
movq -0x40(%rbp), %rdi
callq 0x4450
jmp 0x29153
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x50ce(%rip), %rdi      # 0x2deff
callq 0x27330
testb $0x1, %al
jne 0x28e3c
jmp 0x28e9e
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 $0x310, %rsi            # imm = 0x310
callq 0x20b50
movq -0x48(%rbp), %rdi
callq 0x4450
jmp 0x29151
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x67b9(%rip), %rdi      # 0x2f669
callq 0x27330
testb $0x1, %al
jne 0x28ebb
jmp 0x28f1d
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 $0x314, %rsi            # imm = 0x314
callq 0x20b50
movq -0x50(%rbp), %rdi
callq 0x4450
jmp 0x2914f
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x661d(%rip), %rdi      # 0x2f54c
callq 0x27330
testb $0x1, %al
jne 0x28f3a
jmp 0x28f78
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 $0x300, %rdx            # imm = 0x300
leaq 0x583f(%rip), %rsi      # 0x2e7ab
movb $0x0, %al
callq 0x41c0
jmp 0x2914d
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x5e9a(%rip), %rdi      # 0x2ee24
callq 0x27330
testb $0x1, %al
jne 0x28f95
jmp 0x28ff7
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 $0x304, %rsi            # imm = 0x304
callq 0x208b0
movq -0x58(%rbp), %rdi
callq 0x4450
jmp 0x2914b
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x666a(%rip), %rdi      # 0x2f673
callq 0x27330
testb $0x1, %al
jne 0x29014
jmp 0x29076
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 $0x305, %rsi            # imm = 0x305
callq 0x208b0
movq -0x60(%rbp), %rdi
callq 0x4450
jmp 0x29149
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x65f1(%rip), %rdi      # 0x2f679
callq 0x27330
testb $0x1, %al
jne 0x29093
jmp 0x290be
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x320, %rdi            # imm = 0x320
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x27c60
jmp 0x29167
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0x65b8(%rip), %rdi      # 0x2f688
callq 0x27330
testb $0x1, %al
jne 0x290db
jmp 0x29103
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
addq $0x318, %rdi            # imm = 0x318
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x27c60
jmp 0x29167
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 0x656a(%rip), %rdi      # 0x2f69a
movb $0x0, %al
callq 0x6410
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
jmp 0x29147
jmp 0x29149
jmp 0x2914b
jmp 0x2914d
jmp 0x2914f
jmp 0x29151
jmp 0x29153
jmp 0x29155
jmp 0x29157
jmp 0x29159
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 0x28c32
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)