// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/jsmn.c
// Function: jsmn_parse
int jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
		jsmntok_t *tokens, unsigned int num_tokens) {
	int r;
	int i;
	jsmntok_t *token;
	int count = parser->toknext;

	for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
		char c;
		jsmntype_t type;

		c = js[parser->pos];
		switch (c) {
			case '{': case '[':
				count++;
				if (tokens == NULL) {
					break;
				}
				token = jsmn_alloc_token(parser, tokens, num_tokens);
				if (token == NULL)
					return JSMN_ERROR_NOMEM;
				if (parser->toksuper != -1) {
					tokens[parser->toksuper].size++;
#ifdef JSMN_PARENT_LINKS
					token->parent = parser->toksuper;
#endif
				}
				token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY);
				token->start = parser->pos;
				parser->toksuper = parser->toknext - 1;
				break;
			case '}': case ']':
				if (tokens == NULL)
					break;
				type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
#ifdef JSMN_PARENT_LINKS
				if (parser->toknext < 1) {
					return JSMN_ERROR_INVAL;
				}
				token = &tokens[parser->toknext - 1];
				for (;;) {
					if (token->start != -1 && token->end == -1) {
						if (token->type != type) {
							return JSMN_ERROR_INVAL;
						}
						token->end = parser->pos + 1;
						parser->toksuper = token->parent;
						break;
					}
					if (token->parent == -1) {
						if(token->type != type || parser->toksuper == -1) {
							return JSMN_ERROR_INVAL;
						}
						break;
					}
					token = &tokens[token->parent];
				}
#else
				for (i = parser->toknext - 1; i >= 0; i--) {
					token = &tokens[i];
					if (token->start != -1 && token->end == -1) {
						if (token->type != type) {
							return JSMN_ERROR_INVAL;
						}
						parser->toksuper = -1;
						token->end = parser->pos + 1;
						break;
					}
				}
				/* Error if unmatched closing bracket */
				if (i == -1) return JSMN_ERROR_INVAL;
				for (; i >= 0; i--) {
					token = &tokens[i];
					if (token->start != -1 && token->end == -1) {
						parser->toksuper = i;
						break;
					}
				}
#endif
				break;
			case '\"':
				r = jsmn_parse_string(parser, js, len, tokens, num_tokens);
				if (r < 0) return r;
				count++;
				if (parser->toksuper != -1 && tokens != NULL)
					tokens[parser->toksuper].size++;
				break;
			case '\t' : case '\r' : case '\n' : case ' ':
				break;
			case ':':
				parser->toksuper = parser->toknext - 1;
				break;
			case ',':
				if (tokens != NULL && parser->toksuper != -1 &&
						tokens[parser->toksuper].type != JSMN_ARRAY &&
						tokens[parser->toksuper].type != JSMN_OBJECT) {
#ifdef JSMN_PARENT_LINKS
					parser->toksuper = tokens[parser->toksuper].parent;
#else
					for (i = parser->toknext - 1; i >= 0; i--) {
						if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) {
							if (tokens[i].start != -1 && tokens[i].end == -1) {
								parser->toksuper = i;
								break;
							}
						}
					}
#endif
				}
				break;
#ifdef JSMN_STRICT
			/* In strict mode primitives are: numbers and booleans */
			case '-': case '0': case '1' : case '2': case '3' : case '4':
			case '5': case '6': case '7' : case '8': case '9':
			case 't': case 'f': case 'n' :
				/* And they must not be keys of the object */
				if (tokens != NULL && parser->toksuper != -1) {
					jsmntok_t *t = &tokens[parser->toksuper];
					if (t->type == JSMN_OBJECT ||
							(t->type == JSMN_STRING && t->size != 0)) {
						return JSMN_ERROR_INVAL;
					}
				}
#else
			/* In non-strict mode every unquoted value is a primitive */
			default:
#endif
				r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens);
				if (r < 0) return r;
				count++;
				if (parser->toksuper != -1 && tokens != NULL)
					tokens[parser->toksuper].size++;
				break;

#ifdef JSMN_STRICT
			/* Unexpected char in strict mode */
			default:
				return JSMN_ERROR_INVAL;
#endif
		}
	}

	if (tokens != NULL) {
		for (i = parser->toknext - 1; i >= 0; i--) {
			/* Unmatched opened object or array */
			if (tokens[i].start != -1 && tokens[i].end == -1) {
				return JSMN_ERROR_PART;
			}
		}
	}

	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x4d(%rbp)
jae 0x7260
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x4d(%rbp)
movb -0x4d(%rbp), %al
testb $0x1, %al
jne 0x726c
jmp 0x767b
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, -0x45(%rbp)
movsbl -0x45(%rbp), %eax
movl %eax, -0x54(%rbp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0x7512
jmp 0x7291
movl -0x54(%rbp), %eax
subl $0xd, %eax
je 0x7512
jmp 0x729f
movl -0x54(%rbp), %eax
subl $0x20, %eax
je 0x7512
jmp 0x72ad
movl -0x54(%rbp), %eax
subl $0x22, %eax
je 0x74a8
jmp 0x72bb
movl -0x54(%rbp), %eax
subl $0x2c, %eax
je 0x752d
jmp 0x72c9
movl -0x54(%rbp), %eax
subl $0x3a, %eax
je 0x7517
jmp 0x72d7
movl -0x54(%rbp), %eax
subl $0x5b, %eax
je 0x730a
jmp 0x72e1
movl -0x54(%rbp), %eax
subl $0x5d, %eax
je 0x73ab
jmp 0x72ef
movl -0x54(%rbp), %eax
subl $0x7b, %eax
je 0x730a
jmp 0x72f9
movl -0x54(%rbp), %eax
subl $0x7d, %eax
je 0x73ab
jmp 0x7602
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x731f
jmp 0x7669
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x76f0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x7348
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x76dd
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x736e
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movsbl -0x45(%rbp), %edx
movl $0x2, %ecx
movl $0x1, %eax
cmpl $0x7b, %edx
cmovel %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x7669
cmpq $0x0, -0x28(%rbp)
jne 0x73b7
jmp 0x7669
movsbl -0x45(%rbp), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x7d, %edx
cmovel %ecx, %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x7449
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x743c
movq -0x40(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x743c
movq -0x40(%rbp), %rax
movl (%rax), %eax
cmpl -0x4c(%rbp), %eax
je 0x741f
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x76dd
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x7449
jmp 0x743e
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x73db
cmpl $-0x1, -0x34(%rbp)
jne 0x745b
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x76dd
jmp 0x745d
cmpl $0x0, -0x34(%rbp)
jl 0x74a3
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0x7496
movq -0x40(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x7496
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x74a3
jmp 0x7498
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x745d
jmp 0x7669
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %eax
movl %eax, %r8d
callq 0x7770
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x74d7
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76dd
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x750d
cmpq $0x0, -0x28(%rbp)
je 0x750d
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x7669
jmp 0x7669
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x7669
cmpq $0x0, -0x28(%rbp)
je 0x7600
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x7600
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
je 0x7600
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
je 0x7600
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x75fe
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
je 0x75b9
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x75f1
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x4(%rax)
je 0x75ef
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x8(%rax)
jne 0x75ef
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x75fe
jmp 0x75f1
jmp 0x75f3
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x758b
jmp 0x7600
jmp 0x7669
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %eax
movl %eax, %r8d
callq 0x7a00
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x7631
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x76dd
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
je 0x7667
cmpq $0x0, -0x28(%rbp)
je 0x7667
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x7669
jmp 0x766b
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x7236
cmpq $0x0, -0x28(%rbp)
je 0x76d7
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x76d5
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x4(%rax)
je 0x76c8
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x8(%rax)
jne 0x76c8
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x76dd
jmp 0x76ca
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x768f
jmp 0x76d7
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)