// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/common.c
// Function: findWordByDelimiter
char * findWordByDelimiter(char *word,char delimit, char *line)
/* Return pointer to first occurance of word in line broken by 'delimit' char
   Comparison is case sensitive. Delimit of ' ' uses isspace() */
{
int ix;
char *p=line;
while (p!=NULL && *p!='\0')
    {
    for (ix = 0;
         word[ix] != '\0' && word[ix] == *p;
         ix++,p++) ; // advance as long as they match
    if (ix == strlen(word))
        {
        if (*p=='\0'
        || *p==delimit
        || (delimit == ' ' && isspace(*p)))
            return p - ix; // matched and delimited
        }
    for (;   *p!='\0' && *p!=delimit && (delimit != ' ' || !isspace(*p)); p++)
        ;  // advance to next delimit
    if (*p!='\0')
        {
        p++;
        continue;  // delimited so start again after delimit
        }
    }
return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x31(%rbp)
je 0xa6aa
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xa6b6
jmp 0xa828
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rbp)
je 0xa6ee
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0xa6f7
jmp 0xa710
jmp 0xa6f9
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa6bd
movslq -0x24(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jne 0xa78c
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa771
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0xa771
movsbl -0x11(%rbp), %eax
cmpl $0x20, %eax
jne 0xa78a
callq 0x3760
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0xa78a
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xa830
jmp 0xa78c
jmp 0xa78e
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0xa7ed
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
movsbl -0x11(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x41(%rbp)
je 0xa7ed
movsbl -0x11(%rbp), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x42(%rbp)
jne 0xa7e7
callq 0x3760
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xa7f6
jmp 0xa806
jmp 0xa7f8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa78e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa823
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa68e
jmp 0xa68e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)