// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxProc.c
// Function: Hax_UplevelCmd
int
Hax_UplevelCmd(
    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;
    int result;
    CallFrame *savedVarFramePtr, *framePtr;

    if (argc < 2) {
	uplevelSyntax:
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" ?level? command ?arg ...?\"", (char *) NULL);
	return HAX_ERROR;
    }

    /*
     * Find the level to use for executing the command.
     */

    result = HaxGetFrame(interp, argv[1], &framePtr);
    if (result == -1) {
	return HAX_ERROR;
    }
    argc -= (result+1);
    if (argc == 0) {
	goto uplevelSyntax;
    }
    argv += (result+1);

    /*
     * Modify the interpreter state to execute in the given frame.
     */

    savedVarFramePtr = iPtr->varFramePtr;
    iPtr->varFramePtr = framePtr;

    /*
     * Execute the residual arguments as a command.
     */

    if (argc == 1) {
	result = Hax_Eval(interp, NULL, argv[0], 0, (char **) NULL);
    } else {
	char *cmd;

	cmd = Hax_Concat(interp, argc, argv);
	result = Hax_Eval(interp, NULL, cmd, 0, (char **) NULL);
	ckfree(memoryp, cmd);
    }
    if (result == HAX_ERROR) {
	char msg[60];
	sprintf(msg, "\n    (\"uplevel\" body line %d)", interp->errorLine);
	Hax_AddErrorInfo(interp, msg);
    }

    /*
     * Restore the variable frame, and return.
     */

    iPtr->varFramePtr = savedVarFramePtr;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %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 0x1742a
jmp 0x173f9
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x6569(%rip), %rsi      # 0x1d974
leaq 0x7f28(%rip), %rcx      # 0x1f33a
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0x17553
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x50(%rbp), %rdx
callq 0x41e0
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0x17454
movl $0x1, -0x4(%rbp)
jmp 0x17553
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x1746a
jmp 0x173f9
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0xc8(%rax)
cmpl $0x1, -0x1c(%rbp)
jne 0x174c5
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rsi
callq 0x45b0
movl %eax, -0x3c(%rbp)
jmp 0x1750c
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x4650
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rsi
callq 0x45b0
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq 0x7dd5(%rip), %rdx      # 0x1f2d7
movl $0x13e, %ecx            # imm = 0x13E
callq 0x4260
cmpl $0x1, -0x3c(%rbp)
jne 0x1753e
leaq -0xa0(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x7e2f(%rip), %rsi      # 0x1f356
movb $0x0, %al
callq 0x45d0
movq -0x18(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x43f0
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0xc8(%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nop