// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxVar.c
// Function: ParseSearchId
static ArraySearch *
ParseSearchId(
    Hax_Interp *interp,		/* Interpreter containing variable. */
    Var *varPtr,		/* Array variable search is for. */
    char *varName,		/* Name of array variable that search is
				 * supposed to be for. */
    char *string		/* String containing id of search.  Must have
				 * form "search-num-var" where "num" is a
				 * decimal number and "var" is a variable
				 * name. */)
{
    char *end;
    int id;
    ArraySearch *searchPtr;

    /*
     * Parse the id into the three parts separated by dashes.
     */

    if ((string[0] != 's') || (string[1] != '-')) {
	syntax:
	Hax_AppendResult(interp, "illegal search identifier \"", string,
		"\"", (char *) NULL);
	return NULL;
    }
    id = Strtoul(NULL, string+2, &end, 10);
    if ((end == (string+2)) || (*end != '-')) {
	goto syntax;
    }
    if (strcmp(end+1, varName) != 0) {
	Hax_AppendResult(interp, "search identifier \"", string,
		"\" isn't for variable \"", varName, "\"", (char *) NULL);
	return NULL;
    }

    /*
     * Search through the list of active searches on the interpreter
     * to see if the desired one exists.
     */

    for (searchPtr = varPtr->searchPtr; searchPtr != NULL;
	    searchPtr = searchPtr->nextPtr) {
	if (searchPtr->id == id) {
	    return searchPtr;
	}
    }
    Hax_AppendResult(interp, "couldn't find search \"", string, "\"",
	    (char *) NULL);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x73, %eax
jne 0x1bfb1
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
je 0x1bfe2
jmp 0x1bfb3
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x3b36(%rip), %rsi      # 0x1faf8
leaq 0x12a7(%rip), %rcx      # 0x1d270
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movq $0x0, -0x8(%rbp)
jmp 0x1c0d2
movq -0x28(%rbp), %rsi
addq $0x2, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq -0x30(%rbp), %rdx
movl $0xa, %ecx
callq 0x4340
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
je 0x1c01c
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x1c01e
jmp 0x1bfb3
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
callq 0x4300
cmpl $0x0, %eax
je 0x1c070
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %r8
leaq 0x3ab9(%rip), %rsi      # 0x1fb00
leaq 0x3ac6(%rip), %rcx      # 0x1fb14
leaq 0x121b(%rip), %r9       # 0x1d270
xorl %eax, %eax
movq $0x0, (%rsp)
movb $0x0, %al
callq 0x4500
movq $0x0, -0x8(%rbp)
jmp 0x1c0d2
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1c0a8
movq -0x40(%rbp), %rax
movl (%rax), %eax
cmpl -0x34(%rbp), %eax
jne 0x1c098
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1c0d2
jmp 0x1c09a
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1c07c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x3a74(%rip), %rsi      # 0x1fb2b
leaq 0x11b2(%rip), %rcx      # 0x1d270
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)