// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rsi, %rbx
cmpl $0x1, %edx
jg 0x13dc8
movq (%r14), %rdx
leaq 0x1aca(%rip), %rsi      # 0x15874
leaq 0x372c(%rip), %rcx      # 0x174dd
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x4500
movl $0x1, %eax
jmp 0x13ef2
cmpq $0x0, 0xc8(%rbx)
je 0x13ef0
movl %edx, %ebp
leaq 0x68(%rbx), %rax
movq %rax, 0x8(%rsp)
incl %ebp
addq $0x8, %r14
leaq 0x4(%rsp), %r12
movq (%r14), %rdx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rcx
callq *0xb0(%rbx)
movq %rax, %r13
cmpl $0x0, 0x4(%rsp)
movq %rax, 0x10(%rsp)
je 0x13e5e
movq 0x280(%rbx), %rdi
movl $0x30, %esi
leaq 0x369d(%rip), %rdx      # 0x174bf
movl $0x825, %ecx            # imm = 0x825
callq 0x44c0
movq %rax, %r15
movabsq $0x800000000, %rax      # imm = 0x800000000
movq %rax, (%r15)
xorl %eax, %eax
movl %eax, 0x8(%r15)
movb $0x0, 0x28(%r15)
movl %eax, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movb $0x4, 0x20(%r15)
movq %r15, 0x18(%r13)
jmp 0x13e62
movq 0x18(%r13), %r15
movq 0xc8(%rbx), %rsi
movq (%r14), %rdx
movq %rbx, %rdi
movq %r12, %r13
movq %r12, %rcx
callq *0x48(%rsi)
movq %rax, %r12
cmpl $0x0, 0x4(%rsp)
je 0x13ed3
movq 0x280(%rbx), %rdi
movl $0x30, %esi
leaq 0x362a(%rip), %rdx      # 0x174bf
movl $0x825, %ecx            # imm = 0x825
callq 0x44c0
movabsq $0x800000000, %rcx      # imm = 0x800000000
movq %rcx, (%rax)
xorl %ecx, %ecx
movl %ecx, 0x8(%rax)
movl %ecx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movb $0x2, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
incl 0x8(%r15)
movq %rax, 0x18(%r12)
jmp 0x13ede
movq 0x18(%r12), %rax
testb $0x2, 0x20(%rax)
je 0x13f01
decl %ebp
addq $0x8, %r14
cmpl $0x2, %ebp
movq %r13, %r12
jg 0x13dec
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
leaq 0x1fb8(%rip), %rsi      # 0x15ec3
leaq 0x3744(%rip), %rcx      # 0x17656
jmp 0x13db1