// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxVar.c
// Function: Hax_VarTraceInfo2
ClientData
Hax_VarTraceInfo2(
    Hax_Interp *interp,		/* Interpreter containing variable. */
    char *part1,		/* Name of variable or array. */
    char *part2,		/* Name of element within array;  NULL means
				 * trace applies to scalar variable or array
				 * as-a-whole. */
    int flags,			/* 0 or HAX_GLOBAL_ONLY. */
    Hax_VarTraceProc *proc,	/* Procedure assocated with trace. */
    ClientData prevClientData	/* If non-NULL, gives last value returned
				 * by this procedure, so this call will
				 * return the next trace after that one.
				 * If NULL, this call will return the
				 * first trace. */)
{
    VarTrace *tracePtr;
    Var *varPtr;
    Interp *iPtr = (Interp *) interp;
    Hax_HashEntry *hPtr;

    /*
     * First, lookup the variable.
     */

    if ((flags & HAX_GLOBAL_ONLY) || (iPtr->varFramePtr == NULL)) {
	hPtr = Hax_FindHashEntry(&iPtr->globalTable, part1);
    } else {
	hPtr = Hax_FindHashEntry(&iPtr->varFramePtr->varTable, part1);
    }
    if (hPtr == NULL) {
	return NULL;
    }
    varPtr = (Var *) Hax_GetHashValue(hPtr);
    if (varPtr->flags & VAR_UPVAR) {
	hPtr = varPtr->value.upvarPtr;
	varPtr = (Var *) Hax_GetHashValue(hPtr);
    }
    if (part2 != NULL) {
	if (!(varPtr->flags & VAR_ARRAY)) {
	    return NULL;
	}
	hPtr = Hax_FindHashEntry(varPtr->value.tablePtr, part2);
	if (hPtr == NULL) {
	    return NULL;
	}
	varPtr = (Var *) Hax_GetHashValue(hPtr);
    }

    /*
     * Find the relevant trace, if any, and return its clientData.
     */

    tracePtr = varPtr->tracePtr;
    if (prevClientData != NULL) {
	for ( ; tracePtr != NULL; tracePtr = tracePtr->nextPtr) {
	    if ((tracePtr->clientData == prevClientData)
		    && (tracePtr->traceProc == proc)) {
		tracePtr = tracePtr->nextPtr;
		break;
	    }
	}
    }
    for ( ; tracePtr != NULL; tracePtr = tracePtr->nextPtr) {
	if (tracePtr->traceProc == proc) {
	    return tracePtr->clientData;
	}
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1b1f0
movq -0x50(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x1b20f
movq -0x50(%rbp), %rax
movq 0xa8(%rax), %rax
movq -0x50(%rbp), %rdi
addq $0x68, %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq %rax, -0x58(%rbp)
jmp 0x1b233
movq -0x50(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x40(%rax), %rax
movq -0x50(%rbp), %rcx
movq 0xc8(%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x1b247
movq $0x0, -0x8(%rbp)
jmp 0x1b36e
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1b27a
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1b2db
movq -0x48(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1b29d
movq $0x0, -0x8(%rbp)
jmp 0x1b36e
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x40(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x28(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x1b2cf
movq $0x0, -0x8(%rbp)
jmp 0x1b36e
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1b332
jmp 0x1b2f0
cmpq $0x0, -0x40(%rbp)
je 0x1b330
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x38(%rbp), %rax
jne 0x1b320
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0x1b320
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1b330
jmp 0x1b322
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1b2f0
jmp 0x1b332
jmp 0x1b334
cmpq $0x0, -0x40(%rbp)
je 0x1b366
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpq -0x30(%rbp), %rax
jne 0x1b356
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b36e
jmp 0x1b358
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1b334
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)