// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxVar.c
// Function: Hax_GlobalCmd
int
Hax_GlobalCmd(
    ClientData dummy,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    Var *varPtr, *gVarPtr;
    Interp *iPtr = (Interp *) interp;
    Hax_HashEntry *hPtr, *hPtr2;
    int newPtr;

    if (argc < 2) {
	Hax_AppendResult((Hax_Interp *) iPtr, "wrong # args: should be \"",
		argv[0], " varName ?varName ...?\"", (char *) NULL);
	return HAX_ERROR;
    }
    if (iPtr->varFramePtr == NULL) {
	return HAX_OK;
    }

    for (argc--, argv++; argc > 0; argc--, argv++) {
	hPtr = Hax_CreateHashEntry(interp, &iPtr->globalTable, *argv, &newPtr);
	if (newPtr) {
	    gVarPtr = NewVar(interp, 0);
	    gVarPtr->flags |= VAR_UNDEFINED;
	    Hax_SetHashValue(hPtr, gVarPtr);
	} else {
	    gVarPtr = (Var *) Hax_GetHashValue(hPtr);
	}
	hPtr2 = Hax_CreateHashEntry(interp, &iPtr->varFramePtr->varTable, *argv,
		    &newPtr);
	if (!newPtr) {
	    Var *varPtr;
	    varPtr = (Var *) Hax_GetHashValue(hPtr2);
	    if (varPtr->flags & VAR_UPVAR) {
		continue;
	    } else {
		Hax_AppendResult((Hax_Interp *) iPtr, "variable \"", *argv,
		    "\" already exists", (char *) NULL);
		return HAX_ERROR;
	    }
	}
	varPtr = NewVar(interp, 0);
	varPtr->flags |= VAR_UPVAR;
	varPtr->value.upvarPtr = hPtr;
	gVarPtr->upvarUses++;
	Hax_SetHashValue(hPtr2, varPtr);
    }
    return HAX_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x1c136
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x185d(%rip), %rsi      # 0x1d974
leaq 0x37af(%rip), %rcx      # 0x1f8cd
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0x1c2b5
movq -0x40(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x1c150
movl $0x0, -0x4(%rbp)
jmp 0x1c2b5
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x1c2ae
movq -0x40(%rbp), %rax
movq 0xb0(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x68, %rsi
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
leaq -0x54(%rbp), %rcx
callq *%rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x1c1c7
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1a1e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x1c1d3
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq 0xc8(%rcx), %rsi
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
leaq -0x54(%rbp), %rcx
callq *%rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x54(%rbp)
jne 0x1c253
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1c225
jmp 0x1c294
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x1ba2(%rip), %rsi      # 0x1ddd9
leaq 0x3808(%rip), %rcx      # 0x1fa46
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0x1c2b5
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1a1e0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x20(%rax)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x1c165
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop