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

    if (argc != 3) {
	Hax_AppendResult(interp, "wrong # args: should be \"", argv[0],
		" oldName newName\"", (char *) NULL);
	return HAX_ERROR;
    }
    if (argv[2][0] == '\0') {
	if (Hax_DeleteCommand(interp, argv[1]) != 0) {
	    Hax_AppendResult(interp, "can't delete \"", argv[1],
		    "\": command doesn't exist", (char *) NULL);
	    return HAX_ERROR;
	}
	return HAX_OK;
    }
    hPtr = Hax_FindHashEntry(&iPtr->commandTable, argv[2]);
    if (hPtr != NULL) {
	Hax_AppendResult(interp, "can't rename to \"", argv[2],
		"\": command already exists", (char *) NULL);
	return HAX_ERROR;
    }
    hPtr = Hax_FindHashEntry(&iPtr->commandTable, argv[1]);
    if (hPtr == NULL) {
	Hax_AppendResult(interp, "can't rename \"", argv[1],
		"\":  command doesn't exist", (char *) NULL);
	return HAX_ERROR;
    }
    cmdPtr = (Command *) Hax_GetHashValue(hPtr);
    Hax_DeleteHashEntry(interp, hPtr);
    hPtr = Hax_CreateHashEntry(interp, &iPtr->commandTable, argv[2], &newPtr);
    Hax_SetHashValue(hPtr, cmdPtr);
    return HAX_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x3, -0x1c(%rbp)
je 0xd646
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x1034d(%rip), %rsi     # 0x1d974
leaq 0x10cf4(%rip), %rcx     # 0x1e322
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xd7a7
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xd6aa
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x42f0
cmpl $0x0, %eax
je 0xd69e
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x10cb5(%rip), %rsi     # 0x1e334
leaq 0x10cbd(%rip), %rcx     # 0x1e343
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xd7a7
movl $0x0, -0x4(%rbp)
jmp 0xd7a7
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rsi
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xd701
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x10c7a(%rip), %rsi     # 0x1e35c
leaq 0x10c85(%rip), %rcx     # 0x1e36e
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xd7a7
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xd755
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x10c4f(%rip), %rsi     # 0x1e388
leaq 0x10c57(%rip), %rcx     # 0x1e397
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0xd7a7
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x42d0
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x18, %rsi
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rdx
leaq -0x44(%rbp), %rcx
callq *%rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq