// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/jsmn.c
// Function: jsmn_parse_string
static int jsmn_parse_string(jsmn_parser *parser, const char *js,
		size_t len, jsmntok_t *tokens, size_t num_tokens) {
	jsmntok_t *token;

	int start = parser->pos;

	parser->pos++;

	/* Skip starting quote */
	for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
		char c = js[parser->pos];

		/* Quote: end of string */
		if (c == '\"') {
			if (tokens == NULL) {
				return 0;
			}
			token = jsmn_alloc_token(parser, tokens, num_tokens);
			if (token == NULL) {
				parser->pos = start;
				return JSMN_ERROR_NOMEM;
			}
			jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos);
#ifdef JSMN_PARENT_LINKS
			token->parent = parser->toksuper;
#endif
			return 0;
		}

		/* Backslash: Quoted symbol expected */
		if (c == '\\' && parser->pos + 1 < len) {
			int i;
			parser->pos++;
			switch (js[parser->pos]) {
				/* Allowed escaped symbols */
				case '\"': case '/' : case '\\' : case 'b' :
				case 'f' : case 'r' : case 'n'  : case 't' :
					break;
				/* Allows escaped symbol \uXXXX */
				case 'u':
					parser->pos++;
					for(i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; i++) {
						/* If it isn't a hex character we have an error */
						if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
									(js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */
									(js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */
							parser->pos = start;
							return JSMN_ERROR_INVAL;
						}
						parser->pos++;
					}
					parser->pos--;
					break;
				/* Unexpected symbol */
				default:
					parser->pos = start;
					return JSMN_ERROR_INVAL;
			}
		}
	}
	parser->pos = start;
	return JSMN_ERROR_PART;
}

// 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)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0x77ca
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x77d6
jmp 0x79e1
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, -0x3d(%rbp)
movsbl -0x3d(%rbp), %eax
cmpl $0x22, %eax
jne 0x7859
cmpq $0x0, -0x28(%rbp)
jne 0x7802
movl $0x0, -0x4(%rbp)
jmp 0x79f1
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x76f0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7833
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x79f1
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl $0x3, %esi
callq 0x7bb0
movl $0x0, -0x4(%rbp)
jmp 0x79f1
movsbl -0x3d(%rbp), %eax
cmpl $0x5c, %eax
jne 0x79cf
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, %eax
cmpq -0x20(%rbp), %rax
jae 0x79cf
movq -0x10(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x53, %eax
ja 0x79bb
movq -0x50(%rbp), %rax
leaq 0x25b90(%rip), %rcx     # 0x2d440
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x79cd
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, -0x44(%rbp)
xorl %eax, %eax
cmpl $0x4, -0x44(%rbp)
movb %al, -0x51(%rbp)
jge 0x7905
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0x7905
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x7911
jmp 0x79ae
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x7937
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jle 0x7995
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x41, %eax
jl 0x795d
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x46, %eax
jle 0x7995
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x61, %eax
jl 0x7983
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x66, %eax
jle 0x7995
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x79f1
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x78d0
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x79cd
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x79f1
jmp 0x79cf
jmp 0x79d1
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x77a0
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)