// File: /workspace/github_c_makefile_star2_O0/haxlang[P]hax/haxCmdAH.c
// Function: Hax_ForCmd
int
Hax_ForCmd(
    ClientData dummy,			/* Not used. */
    Hax_Interp *interp,			/* Current interpreter. */
    int argc,				/* Number of arguments. */
    char **argv				/* Argument strings. */)
{
    int result, value;

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

    result = Hax_Eval(interp, NULL, argv[1], 0, (char **) NULL);
    if (result != HAX_OK) {
	if (result == HAX_ERROR) {
	    Hax_AddErrorInfo(interp,
		(char *) "\n    (\"for\" initial command)");
	}
	return result;
    }
    while (1) {
	result = Hax_ExprBoolean(interp, argv[2], &value);
	if (result != HAX_OK) {
	    return result;
	}
	if (!value) {
	    break;
	}
	result = Hax_Eval(interp, NULL, argv[4], 0, (char **) NULL);
	if (result == HAX_CONTINUE) {
	    result = HAX_OK;
	} else if (result != HAX_OK) {
	    if (result == HAX_ERROR) {
		char msg[60];
		sprintf(msg, "\n    (\"for\" body line %d)", interp->errorLine);
		Hax_AddErrorInfo(interp, msg);
	    }
	    break;
	}
	result = Hax_Eval(interp, NULL, argv[3], 0, (char **) NULL);
	if (result == HAX_BREAK) {
	    break;
	} else if (result != HAX_OK) {
	    if (result == HAX_ERROR) {
		Hax_AddErrorInfo(interp,
		    (char *) "\n    (\"for\" loop-end command)");
	    }
	    return result;
	}
    }
    if (result == HAX_BREAK) {
	result = HAX_OK;
    }
    if (result == HAX_OK) {
	Hax_ResetResult(interp);
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x5, -0x1c(%rbp)
je 0x98de
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x140b5(%rip), %rsi     # 0x1d974
leaq 0x141cb(%rip), %rcx     # 0x1da91
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x4500
movl $0x1, -0x4(%rbp)
jmp 0x9a2f
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rsi
callq 0x45b0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x9923
cmpl $0x1, -0x2c(%rbp)
jne 0x9918
movq -0x18(%rbp), %rdi
leaq 0x14198(%rip), %rsi     # 0x1daab
callq 0x43f0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9a2f
jmp 0x9925
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x30(%rbp), %rdx
callq 0x4640
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x994e
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9a2f
cmpl $0x0, -0x30(%rbp)
jne 0x9959
jmp 0x9a0d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rsi
callq 0x45b0
movl %eax, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jne 0x9986
movl $0x0, -0x2c(%rbp)
jmp 0x99bc
cmpl $0x0, -0x2c(%rbp)
je 0x99ba
cmpl $0x1, -0x2c(%rbp)
jne 0x99b8
leaq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x14124(%rip), %rsi     # 0x1dac8
movb $0x0, %al
callq 0x45d0
movq -0x18(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x43f0
jmp 0x9a0d
jmp 0x99bc
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %ecx, %ecx
movq %r8, %rsi
callq 0x45b0
movl %eax, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jne 0x99e2
jmp 0x9a0d
cmpl $0x0, -0x2c(%rbp)
je 0x9a06
cmpl $0x1, -0x2c(%rbp)
jne 0x99fe
movq -0x18(%rbp), %rdi
leaq 0x140e9(%rip), %rsi     # 0x1dae2
callq 0x43f0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x9a2f
jmp 0x9a08
jmp 0x9925
cmpl $0x3, -0x2c(%rbp)
jne 0x9a1a
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x9a29
movq -0x18(%rbp), %rdi
callq 0x42b0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)