// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxCmdMZ.c
// Function: Hax_TraceCmd
int
Hax_TraceCmd(
    ClientData dummy,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    Interp *iPtr = (Interp *) interp;
    Hax_Memoryp *memoryp = iPtr->memoryp;
    char c;
    int length;

    if (argc < 2) {
	Hax_AppendResult(interp, "too few args: should be \"",
		argv[0], " option [arg arg ...]\"", (char *) NULL);
	return HAX_ERROR;
    }
    c = argv[1][1];
    length = strlen(argv[1]);
    if ((c == 'a') && (strncmp(argv[1], "variable", length) == 0)
	    && (length >= 2)) {
	char *p;
	int flags, length;
	TraceVarInfo *tvarPtr;

	if (argc != 5) {
	    Hax_AppendResult(interp, "wrong # args: should be \"",
		    argv[0], " variable name ops command\"", (char *) NULL);
	    return HAX_ERROR;
	}

	flags = 0;
	for (p = argv[3] ; *p != 0; p++) {
	    if (*p == 'r') {
		flags |= HAX_TRACE_READS;
	    } else if (*p == 'w') {
		flags |= HAX_TRACE_WRITES;
	    } else if (*p == 'u') {
		flags |= HAX_TRACE_UNSETS;
	    } else {
		goto badOps;
	    }
	}
	if (flags == 0) {
	    goto badOps;
	}

	length = strlen(argv[4]);
	tvarPtr = (TraceVarInfo *) ckalloc(memoryp, (unsigned)
		(sizeof(TraceVarInfo) - sizeof(tvarPtr->command) + length + 1));
	tvarPtr->flags = flags;
	tvarPtr->length = length;
	flags |= HAX_TRACE_UNSETS;
	strcpy(tvarPtr->command, argv[4]);
	if (Hax_TraceVar(interp, argv[2], flags, TraceVarProc,
		(ClientData) tvarPtr) != HAX_OK) {
	    ckfree(memoryp, (char *) tvarPtr);
	    return HAX_ERROR;
	}
    } else if ((c == 'd') && (strncmp(argv[1], "vdelete", length)
	    && (length >= 2)) == 0) {
	char *p;
	int flags, length;
	TraceVarInfo *tvarPtr;
	ClientData clientData;

	if (argc != 5) {
	    Hax_AppendResult(interp, "wrong # args: should be \"",
		    argv[0], " vdelete name ops command\"", (char *) NULL);
	    return HAX_ERROR;
	}

	flags = 0;
	for (p = argv[3] ; *p != 0; p++) {
	    if (*p == 'r') {
		flags |= HAX_TRACE_READS;
	    } else if (*p == 'w') {
		flags |= HAX_TRACE_WRITES;
	    } else if (*p == 'u') {
		flags |= HAX_TRACE_UNSETS;
	    } else {
		goto badOps;
	    }
	}
	if (flags == 0) {
	    goto badOps;
	}

	/*
	 * Search through all of our traces on this variable to
	 * see if there's one with the given command.  If so, then
	 * delete the first one that matches.
	 */

	length = strlen(argv[4]);
	clientData = 0;
	while ((clientData = Hax_VarTraceInfo(interp, argv[2], 0,
		TraceVarProc, clientData)) != 0) {
	    tvarPtr = (TraceVarInfo *) clientData;
	    if ((tvarPtr->length == length) && (tvarPtr->flags == flags)
		    && (strncmp(argv[4], tvarPtr->command, length) == 0)) {
		Hax_UntraceVar(interp, argv[2], flags | HAX_TRACE_UNSETS,
			TraceVarProc, clientData);
		ckfree(memoryp, (char *) tvarPtr);
		break;
	    }
	}
    } else if ((c == 'i') && (strncmp(argv[1], "vinfo", length) == 0)
	    && (length >= 2)) {
	ClientData clientData;
	char ops[4], *p;
	char *prefix = (char *) "{";

	if (argc != 3) {
	    Hax_AppendResult(interp, "wrong # args: should be \"",
		    argv[0], " vinfo name\"", (char *) NULL);
	    return HAX_ERROR;
	}
	clientData = 0;
	while ((clientData = Hax_VarTraceInfo(interp, argv[2], 0,
		TraceVarProc, clientData)) != 0) {
	    TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData;
	    p = ops;
	    if (tvarPtr->flags & HAX_TRACE_READS) {
		*p = 'r';
		p++;
	    }
	    if (tvarPtr->flags & HAX_TRACE_WRITES) {
		*p = 'w';
		p++;
	    }
	    if (tvarPtr->flags & HAX_TRACE_UNSETS) {
		*p = 'u';
		p++;
	    }
	    *p = '\0';
	    Hax_AppendResult(interp, prefix, (char *) NULL);
	    Hax_AppendElement(interp, ops, 1);
	    Hax_AppendElement(interp, tvarPtr->command, 0);
	    Hax_AppendResult(interp, "}", (char *) NULL);
	    prefix = (char *) " {";
	}
    } else {
	Hax_AppendResult(interp, "bad option \"", argv[1],
		"\": should be variable, vdelete, or vinfo",
		(char *) NULL);
	return HAX_ERROR;
    }
    return HAX_OK;

    badOps:
    Hax_AppendResult(interp, "bad operations \"", argv[3],
	    "\": should be one or more of rwu", (char *) NULL);
    return HAX_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x280(%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0xeed8
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0xf783(%rip), %rsi      # 0x1e63c
leaq 0xf796(%rip), %rcx      # 0x1e656
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movb 0x1(%rax), %al
movb %al, -0x39(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x41b0
movl %eax, -0x40(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x61, %eax
jne 0xf0a5
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x40(%rbp), %rdx
leaq 0x10b7d(%rip), %rsi     # 0x1fa93
callq 0x40a0
cmpl $0x0, %eax
jne 0xf0a5
cmpl $0x2, -0x40(%rbp)
jl 0xf0a5
cmpl $0x5, -0x1c(%rbp)
je 0xef65
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0xea2e(%rip), %rsi      # 0x1d974
leaq 0xf720(%rip), %rcx      # 0x1e66d
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
movl $0x0, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xefe2
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0xef9b
movl -0x4c(%rbp), %eax
orl $0x10, %eax
movl %eax, -0x4c(%rbp)
jmp 0xefd2
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
jne 0xefb2
movl -0x4c(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x4c(%rbp)
jmp 0xefd0
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0xefc9
movl -0x4c(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x4c(%rbp)
jmp 0xefce
jmp 0xf480
jmp 0xefd0
jmp 0xefd2
jmp 0xefd4
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xef78
cmpl $0x0, -0x4c(%rbp)
jne 0xefed
jmp 0xf480
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x41b0
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x50(%rbp), %rax
addq $0x8, %rax
addq $0x1, %rax
movl %eax, %eax
movl %eax, %esi
leaq 0xf26a(%rip), %rdx      # 0x1e282
movl $0x48f, %ecx            # imm = 0x48F
callq 0x44c0
movq %rax, -0x58(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movl -0x50(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4c(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x4c(%rbp)
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x40d0
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x4c(%rbp), %edx
movq -0x58(%rbp), %r8
leaq 0x44f(%rip), %rcx       # 0xf4c0
callq 0x4380
cmpl $0x0, %eax
je 0xf0a0
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq 0xf1f8(%rip), %rdx      # 0x1e282
movl $0x496, %ecx            # imm = 0x496
callq 0x4260
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
jmp 0xf477
movsbl -0x39(%rbp), %eax
cmpl $0x64, %eax
jne 0xf27d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x40(%rbp), %rdx
leaq 0xf5c4(%rip), %rsi      # 0x1e689
callq 0x40a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xa1(%rbp)
je 0xf0e6
cmpl $0x2, -0x40(%rbp)
setge %al
movb %al, -0xa1(%rbp)
movb -0xa1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xf27d
cmpl $0x5, -0x1c(%rbp)
je 0xf131
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0xe862(%rip), %rsi      # 0x1d974
leaq 0xf578(%rip), %rcx      # 0x1e691
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
movl $0x0, -0x64(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xf1ae
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0xf167
movl -0x64(%rbp), %eax
orl $0x10, %eax
movl %eax, -0x64(%rbp)
jmp 0xf19e
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
jne 0xf17e
movl -0x64(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x64(%rbp)
jmp 0xf19c
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0xf195
movl -0x64(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x64(%rbp)
jmp 0xf19a
jmp 0xf480
jmp 0xf19c
jmp 0xf19e
jmp 0xf1a0
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0xf144
cmpl $0x0, -0x64(%rbp)
jne 0xf1b9
jmp 0xf480
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x41b0
movl %eax, -0x68(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x78(%rbp), %r8
xorl %edx, %edx
leaq 0x2d6(%rip), %rcx       # 0xf4c0
callq 0x44d0
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0xf278
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x68(%rbp), %eax
jne 0xf273
movq -0x70(%rbp), %rax
movl (%rax), %eax
cmpl -0x64(%rbp), %eax
jne 0xf273
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x70(%rbp), %rsi
addq $0x8, %rsi
movslq -0x68(%rbp), %rdx
callq 0x40a0
cmpl $0x0, %eax
jne 0xf273
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x64(%rbp), %edx
orl $0x40, %edx
movq -0x78(%rbp), %r8
leaq 0x26d(%rip), %rcx       # 0xf4c0
callq 0x4210
movq -0x38(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq 0xf01b(%rip), %rdx      # 0x1e282
movl $0x4c5, %ecx            # imm = 0x4C5
callq 0x4260
jmp 0xf278
jmp 0xf1d1
jmp 0xf475
movsbl -0x39(%rbp), %eax
cmpl $0x69, %eax
jne 0xf444
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x40(%rbp), %rdx
leaq 0xf444(%rip), %rsi      # 0x1e6e1
callq 0x40a0
cmpl $0x0, %eax
jne 0xf444
cmpl $0x2, -0x40(%rbp)
jl 0xf444
leaq 0xf400(%rip), %rax      # 0x1e6bc
movq %rax, -0x98(%rbp)
cmpl $0x3, -0x1c(%rbp)
je 0xf2fa
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0xe699(%rip), %rsi      # 0x1d974
leaq 0xf3ca(%rip), %rcx      # 0x1e6ac
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
movq $0x0, -0x80(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x80(%rbp), %r8
xorl %edx, %edx
leaq 0x1a5(%rip), %rcx       # 0xf4c0
callq 0x44d0
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0xf442
movq -0x80(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x84(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xa0(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xf374
movq -0x90(%rbp), %rax
movb $0x72, (%rax)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0xa0(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xf3a1
movq -0x90(%rbp), %rax
movb $0x77, (%rax)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0xa0(%rbp), %rax
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xf3ce
movq -0x90(%rbp), %rax
movb $0x75, (%rax)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rdi
movq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4500
movq -0x18(%rbp), %rdi
leaq -0x84(%rbp), %rsi
movl $0x1, %edx
callq 0x4040
movq -0x18(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x4040
movq -0x18(%rbp), %rdi
leaq 0xf295(%rip), %rsi      # 0x1e6b9
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x4500
leaq 0xf285(%rip), %rax      # 0x1e6bb
movq %rax, -0x98(%rbp)
jmp 0xf302
jmp 0xf473
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xe2c7(%rip), %rsi      # 0x1d71e
leaq 0xf260(%rip), %rcx      # 0x1e6be
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xf4ad
jmp 0xf475
jmp 0xf477
movl $0x0, -0x4(%rbp)
jmp 0xf4ad
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0xf254(%rip), %rsi      # 0x1e6e7
leaq 0xf25e(%rip), %rcx      # 0x1e6f8
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)