// File: /workspace/github_c_makefile_star2_O0/baskerville[P]sxhkd/src/parse.c
// Function: get_token
char *get_token(char *dst, char *ign, char *src, char *sep)
{
	size_t len = strlen(src);
	unsigned int i = 0, j = 0, k = 0;
	bool inhibit = false;
	bool found = false;
	while (i < len && !found) {
		if (inhibit) {
			dst[j++] = src[i];
			inhibit = false;
		} else if (src[i] == MAGIC_INHIBIT) {
			inhibit = true;
			if (src[i+1] != MAGIC_INHIBIT && strchr(sep, src[i+1]) == NULL)
				dst[j++] = src[i];
		} else if (strchr(sep, src[i]) != NULL) {
			if (j > 0)
				found = true;
			do {
				if (ign != NULL)
					ign[k++] = src[i];
				i++;
			} while (i < len && strchr(sep, src[i]) != NULL);
			i--;
		} else {
			dst[j++] = src[i];
		}
		i++;
	}
	dst[j] = '\0';
	if (ign != NULL)
		ign[k] = '\0';
	return src + i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe120
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movb $0x0, -0x35(%rbp)
movb $0x0, -0x36(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x37(%rbp)
jae 0x10baa
movb -0x36(%rbp), %al
xorb $-0x1, %al
movb %al, -0x37(%rbp)
movb -0x37(%rbp), %al
testb $0x1, %al
jne 0x10bb6
jmp 0x10d12
testb $0x1, -0x35(%rbp)
je 0x10be3
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb $0x0, -0x35(%rbp)
jmp 0x10d04
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0x10c4e
movb $0x1, -0x35(%rbp)
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
je 0x10c49
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %esi
callq 0xe150
cmpq $0x0, %rax
jne 0x10c49
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x10d02
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsbl (%rax,%rcx), %esi
callq 0xe150
cmpq $0x0, %rax
je 0x10ce2
cmpl $0x0, -0x30(%rbp)
jbe 0x10c72
movb $0x1, -0x36(%rbp)
jmp 0x10c74
cmpq $0x0, -0x10(%rbp)
je 0x10c99
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x34(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x38(%rbp)
jae 0x10cd0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movsbl (%rax,%rcx), %esi
callq 0xe150
cmpq $0x0, %rax
setne %al
movb %al, -0x38(%rbp)
movb -0x38(%rbp), %al
testb $0x1, %al
jne 0x10c74
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x10d00
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x10d02
jmp 0x10d04
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x10b92
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movb $0x0, (%rax,%rcx)
cmpq $0x0, -0x10(%rbp)
je 0x10d2f
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop