// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/util/json.c
// Function: match_str
static const uint8_t *
match_str(const uint8_t * buf, const uint8_t * end, const char * s,
    int * foundit)
{
	char ch;

	/* The string matches... unless we notice that it doesn't match. */
	*foundit = 1;

	/* Scan through the string recording if it ever doesn't match. */
	do {
		if (buf == end)
			return (end);
		ch = (char)(*buf++);

		/* Have we hit the end of the string? */
		if (ch == '"') {
			if (s[0] != '\0')
				*foundit = 0;
			return (buf);
		}

		/* Escape character? */
		if (ch == '\\') {
			if (buf == end)
				return (end);
			switch (*buf++) {
			case '"':
				ch = '"';
				break;
			case '\\':
				ch = '\\';
				break;
			case '/':
				ch = '/';
				break;
			case 'b':
				ch = 0x08;
				break;
			case 'f':
				ch = 0x0C;
				break;
			case 'n':
				ch = 0x0A;
				break;
			case 'r':
				ch = 0x0D;
				break;
			case 't':
				ch = 0x09;
				break;
			case 'u':
				if (end - buf < 4)
					return (end);
				*foundit = 0;	/* Assume non-matching. */
				buf += 4;
				break;
			default:
				/* Invalid JSON. */
				*foundit = 0;
				return (end);
			}
		}

		/* Did this character match? */
		if (ch != s[0])
			*foundit = 0;

		/* Advance in the target if we haven't hit the end. */
		if (*s)
			s++;
	} while (1);

	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x106e5
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10831
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x22, %eax
jne 0x10725
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x10718
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10831
movsbl -0x29(%rbp), %eax
cmpl $0x5c, %eax
jne 0x107f5
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x10749
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10831
movq -0x10(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x53, %eax
ja 0x107df
movq -0x38(%rbp), %rax
leaq 0xf1a5(%rip), %rcx      # 0x1f918
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x22, -0x29(%rbp)
jmp 0x107f3
movb $0x5c, -0x29(%rbp)
jmp 0x107f3
movb $0x2f, -0x29(%rbp)
jmp 0x107f3
movb $0x8, -0x29(%rbp)
jmp 0x107f3
movb $0xc, -0x29(%rbp)
jmp 0x107f3
movb $0xa, -0x29(%rbp)
jmp 0x107f3
movb $0xd, -0x29(%rbp)
jmp 0x107f3
movb $0x9, -0x29(%rbp)
jmp 0x107f3
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x4, %rax
jge 0x107c7
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10831
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x107f3
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10831
jmp 0x107f5
movsbl -0x29(%rbp), %eax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x1080e
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x10823
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x10825
movb $0x1, %al
testb $0x1, %al
jne 0x106ce
jmp 0x10831
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)